[ { "question": "How many singers do we have?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many singers do we have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM singer", "external_knowledge": "None" }, { "question": "What is the total number of singers?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the total number of singers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM singer", "external_knowledge": "None" }, { "question": "Show name, country, age for all singers ordered by age from the oldest to the youngest.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow name, country, age for all singers ordered by age from the oldest to the youngest.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , country , age FROM singer ORDER BY age DESC", "external_knowledge": "None" }, { "question": "What are the names, countries, and ages for every singer in descending order of age?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names, countries, and ages for every singer in descending order of age?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , country , age FROM singer ORDER BY age DESC", "external_knowledge": "None" }, { "question": "What is the average, minimum, and maximum age of all singers from France?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['France', 'Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['France', 'Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average, minimum, and maximum age of all singers from France?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'", "external_knowledge": "None" }, { "question": "What is the average, minimum, and maximum age for all French singers?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average, minimum, and maximum age for all French singers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'", "external_knowledge": "None" }, { "question": "Show the name and the release year of the song by the youngest singer.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the name and the release year of the song by the youngest singer.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1", "external_knowledge": "None" }, { "question": "What are the names and release years for all the songs of the youngest singer?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names and release years for all the songs of the youngest singer?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1", "external_knowledge": "None" }, { "question": "What are all distinct countries where singers above age 20 are from?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are all distinct countries where singers above age 20 are from?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT country FROM singer WHERE age > 20", "external_knowledge": "None" }, { "question": "What are the different countries with singers above age 20?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the different countries with singers above age 20?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT country FROM singer WHERE age > 20", "external_knowledge": "None" }, { "question": "Show all countries and the number of singers in each country.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all countries and the number of singers in each country.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT country , count(*) FROM singer GROUP BY country", "external_knowledge": "None" }, { "question": "How many singers are from each country?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many singers are from each country?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT country , count(*) FROM singer GROUP BY country", "external_knowledge": "None" }, { "question": "List all song names by singers above the average age.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList all song names by singers above the average age.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)", "external_knowledge": "None" }, { "question": "What are all the song names by singers who are older than average?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are all the song names by singers who are older than average?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)", "external_knowledge": "None" }, { "question": "Show location and name for all stadiums with a capacity between 5000 and 10000.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow location and name for all stadiums with a capacity between 5000 and 10000.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000", "external_knowledge": "None" }, { "question": "What are the locations and names of all stations with capacity between 5000 and 10000?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the locations and names of all stations with capacity between 5000 and 10000?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000", "external_knowledge": "None" }, { "question": "What is the maximum capacity and the average of all stadiums ?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the maximum capacity and the average of all stadiums ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select max(capacity), average from stadium", "external_knowledge": "None" }, { "question": "What is the average and maximum capacities for all stadiums ?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average and maximum capacities for all stadiums ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select avg(capacity) , max(capacity) from stadium", "external_knowledge": "None" }, { "question": "What is the name and capacity for the stadium with highest average attendance?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name and capacity for the stadium with highest average attendance?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the name and capacity for the stadium with the highest average attendance?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name and capacity for the stadium with the highest average attendance?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1", "external_knowledge": "None" }, { "question": "How many concerts are there in year 2014 or 2015?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many concerts are there in year 2014 or 2015?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015", "external_knowledge": "None" }, { "question": "How many concerts occurred in 2014 or 2015?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many concerts occurred in 2014 or 2015?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015", "external_knowledge": "None" }, { "question": "Show the stadium name and the number of concerts in each stadium.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the stadium name and the number of concerts in each stadium.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id", "external_knowledge": "None" }, { "question": "For each stadium, how many concerts play there?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor each stadium, how many concerts play there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id", "external_knowledge": "None" }, { "question": "Show the stadium name and capacity with most number of concerts in year 2014 or after.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the stadium name and capacity with most number of concerts in year 2014 or after.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name , T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the name and capacity of the stadium with the most concerts after 2013 ?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name and capacity of the stadium with the most concerts after 2013 ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select t2.name , t2.capacity from concert as t1 join stadium as t2 on t1.stadium_id = t2.stadium_id where t1.year > 2013 group by t2.stadium_id order by count(*) desc limit 1", "external_knowledge": "None" }, { "question": "Which year has most number of concerts?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich year has most number of concerts?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the year that had the most concerts?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the year that had the most concerts?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Show the stadium names without any concert.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the stadium names without any concert.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)", "external_knowledge": "None" }, { "question": "What are the names of the stadiums without any concerts?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the stadiums without any concerts?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)", "external_knowledge": "None" }, { "question": "Show countries where a singer above age 40 and a singer below 30 are from.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow countries where a singer above age 40 and a singer below 30 are from.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30", "external_knowledge": "None" }, { "question": "Show names for all stadiums except for stadiums having a concert in year 2014.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow names for all stadiums except for stadiums having a concert in year 2014.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014", "external_knowledge": "None" }, { "question": "What are the names of all stadiums that did not have a concert in 2014?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of all stadiums that did not have a concert in 2014?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014", "external_knowledge": "None" }, { "question": "Show the name and theme for all concerts and the number of singers in each concert.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the name and theme for all concerts and the number of singers in each concert.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.concert_name , T2.theme , count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id", "external_knowledge": "None" }, { "question": "What are the names , themes , and number of singers for every concert ?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names , themes , and number of singers for every concert ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select t2.concert_name , t2.theme , count(*) from singer_in_concert as t1 join concert as t2 on t1.concert_id = t2.concert_id group by t2.concert_id", "external_knowledge": "None" }, { "question": "List singer names and number of concerts for each singer.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList singer names and number of concerts for each singer.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id", "external_knowledge": "None" }, { "question": "What are the names of the singers and number of concerts for each person?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the singers and number of concerts for each person?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id", "external_knowledge": "None" }, { "question": "List all singer names in concerts in year 2014.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList all singer names in concerts in year 2014.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014", "external_knowledge": "None" }, { "question": "What are the names of the singers who performed in a concert in 2014?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the singers who performed in a concert in 2014?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014", "external_knowledge": "None" }, { "question": "what is the name and nation of the singer who have a song having 'Hey' in its name?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nwhat is the name and nation of the singer who have a song having 'Hey' in its name?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'", "external_knowledge": "None" }, { "question": "What is the name and country of origin of every singer who has a song with the word 'Hey' in its title?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name and country of origin of every singer who has a song with the word 'Hey' in its title?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'", "external_knowledge": "None" }, { "question": "Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015.", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015", "external_knowledge": "None" }, { "question": "What are the names and locations of the stadiums that had concerts that occurred in both 2014 and 2015?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names and locations of the stadiums that had concerts that occurred in both 2014 and 2015?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015", "external_knowledge": "None" }, { "question": "Find the number of concerts happened in the stadium with the highest capacity .", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of concerts happened in the stadium with the highest capacity .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)", "external_knowledge": "None" }, { "question": "What are the number of concerts that occurred in the stadium with the largest capacity ?", "schema": "CREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE stadium (\n Stadium_ID number, -- example: [1, 2]\n Location text, -- example: ['Raith Rovers', 'Ayr United']\n Name text, -- example: [\"Stark's Park\", 'Somerset Park']\n Capacity number, -- example: [10104, 11998]\n Highest number, -- example: [4812, 2363]\n Lowest number, -- example: [1294, 1057]\n Average number, -- example: [2106, 1477]\n PRIMARY KEY (Stadium_ID)\n);\n\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Joe Sharp', 'Timbaland']\n Country text, -- example: ['Netherlands', 'United States']\n Song_Name text, -- example: ['You', 'Dangerous']\n Song_release_year text, -- example: ['1992', '2008']\n Age number, -- example: [52, 32]\n Is_male others, -- example: ['F', 'T']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE concert (\n concert_ID number, -- example: [1, 2]\n concert_Name text, -- example: ['Auditions', 'Super bootcamp']\n Theme text, -- example: ['Free choice', 'Free choice 2']\n Stadium_ID text, -- example: ['1', '2']\n `Year` text, -- example: ['2014', '2015']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_concert_stadium_id FOREIGN KEY (Stadium_ID) REFERENCES stadium (Stadium_ID)\n);\n\nCREATE TABLE singer_in_concert (\n concert_ID number, -- example: [1, 2]\n Singer_ID text, -- example: ['2', '3']\n PRIMARY KEY (concert_ID),\n CONSTRAINT fk_singer_in_concert_concert_id FOREIGN KEY (concert_ID) REFERENCES concert (concert_ID),\n CONSTRAINT fk_singer_in_concert_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the number of concerts that occurred in the stadium with the largest capacity ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)", "external_knowledge": "None" }, { "question": "Find the number of pets whose weight is heavier than 10.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of pets whose weight is heavier than 10.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM pets WHERE weight > 10", "external_knowledge": "None" }, { "question": "How many pets have a greater weight than 10?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many pets have a greater weight than 10?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM pets WHERE weight > 10", "external_knowledge": "None" }, { "question": "Find the weight of the youngest dog.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the weight of the youngest dog.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT weight FROM pets ORDER BY pet_age LIMIT 1", "external_knowledge": "None" }, { "question": "How much does the youngest dog weigh?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow much does the youngest dog weigh?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT weight FROM pets ORDER BY pet_age LIMIT 1", "external_knowledge": "None" }, { "question": "Find the maximum weight for each type of pet. List the maximum weight and pet type.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the maximum weight for each type of pet. List the maximum weight and pet type.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(weight) , petType FROM pets GROUP BY petType", "external_knowledge": "None" }, { "question": "List the maximum weight and type for each type of pet.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the maximum weight and type for each type of pet.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(weight) , petType FROM pets GROUP BY petType", "external_knowledge": "None" }, { "question": "Find number of pets owned by students who are older than 20.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind number of pets owned by students who are older than 20.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", "external_knowledge": "None" }, { "question": "How many pets are owned by students that have an age greater than 20?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many pets are owned by students that have an age greater than 20?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", "external_knowledge": "None" }, { "question": "Find the number of dog pets that are raised by female students (with sex F).", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of dog pets that are raised by female students (with sex F).\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'", "external_knowledge": "None" }, { "question": "How many dog pets are raised by female students?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many dog pets are raised by female students?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'", "external_knowledge": "None" }, { "question": "Find the number of distinct type of pets.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of distinct type of pets.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT pettype) FROM pets", "external_knowledge": "None" }, { "question": "How many different types of pet are there?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many different types of pet are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT pettype) FROM pets", "external_knowledge": "None" }, { "question": "Find the first name of students who have cat or dog pet.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the first name of students who have cat or dog pet.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog'", "external_knowledge": "None" }, { "question": "What are the first names of every student who has a cat or dog as a pet?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the first names of every student who has a cat or dog as a pet?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog'", "external_knowledge": "None" }, { "question": "Find the first name of students who have both cat and dog pets .", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the first name of students who have both cat and dog pets .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select t1.fname from student as t1 join has_pet as t2 on t1.stuid = t2.stuid join pets as t3 on t3.petid = t2.petid where t3.pettype = 'cat' intersect select t1.fname from student as t1 join has_pet as t2 on t1.stuid = t2.stuid join pets as t3 on t3.petid = t2.petid where t3.pettype = 'dog'", "external_knowledge": "None" }, { "question": "What are the students' first names who have both cats and dogs as pets?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['dog', 'cat']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the students' first names who have both cats and dogs as pets?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog'", "external_knowledge": "None" }, { "question": "Find the major and age of students who do not have a cat pet.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the major and age of students who do not have a cat pet.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "external_knowledge": "None" }, { "question": "What major is every student who does not own a cat as a pet, and also how old are they?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat major is every student who does not own a cat as a pet, and also how old are they?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "external_knowledge": "None" }, { "question": "Find the id of students who do not have a cat pet.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the id of students who do not have a cat pet.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'", "external_knowledge": "None" }, { "question": "What are the ids of the students who do not own cats as pets?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids of the students who do not own cats as pets?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'", "external_knowledge": "None" }, { "question": "Find the first name and age of students who have a dog but do not have a cat as a pet.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the first name and age of students who have a dog but do not have a cat as a pet.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "external_knowledge": "None" }, { "question": "What is the first name of every student who has a dog but does not have a cat?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the first name of every student who has a dog but does not have a cat?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "external_knowledge": "None" }, { "question": "Find the type and weight of the youngest pet.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the type and weight of the youngest pet.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1", "external_knowledge": "None" }, { "question": "What type of pet is the youngest animal, and how much does it weigh?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat type of pet is the youngest animal, and how much does it weigh?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1", "external_knowledge": "None" }, { "question": "Find the id and weight of all pets whose age is older than 1.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the id and weight of all pets whose age is older than 1.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT petid , weight FROM pets WHERE pet_age > 1", "external_knowledge": "None" }, { "question": "What is the id and weight of every pet who is older than 1?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the id and weight of every pet who is older than 1?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT petid , weight FROM pets WHERE pet_age > 1", "external_knowledge": "None" }, { "question": "Find the average and maximum age for each type of pet.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the average and maximum age for each type of pet.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype", "external_knowledge": "None" }, { "question": "What is the average and maximum age for each pet type?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average and maximum age for each pet type?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype", "external_knowledge": "None" }, { "question": "Find the average weight for each pet type.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the average weight for each pet type.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(weight) , pettype FROM pets GROUP BY pettype", "external_knowledge": "None" }, { "question": "What is the average weight for each type of pet?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average weight for each type of pet?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(weight) , pettype FROM pets GROUP BY pettype", "external_knowledge": "None" }, { "question": "Find the first name and age of students who have a pet.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the first name and age of students who have a pet.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", "external_knowledge": "None" }, { "question": "What are the different first names and ages of the students who do have pets?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the different first names and ages of the students who do have pets?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", "external_knowledge": "None" }, { "question": "Find the id of the pet owned by student whose last name is ‘Smith’.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the id of the pet owned by student whose last name is ‘Smith’.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'", "external_knowledge": "None" }, { "question": "What is the id of the pet owned by the student whose last name is 'Smith'?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the id of the pet owned by the student whose last name is 'Smith'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'", "external_knowledge": "None" }, { "question": "Find the number of pets for each student who has any pet and student id.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of pets for each student who has any pet and student id.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid", "external_knowledge": "None" }, { "question": "For students who have pets , how many pets does each student have ? list their ids instead of names .", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor students who have pets , how many pets does each student have ? list their ids instead of names .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select count(*) , t1.stuid from student as t1 join has_pet as t2 on t1.stuid = t2.stuid group by t1.stuid", "external_knowledge": "None" }, { "question": "Find the first name and gender of student who have more than one pet.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the first name and gender of student who have more than one pet.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1", "external_knowledge": "None" }, { "question": "What is the first name and gender of the all the students who have more than one pet?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the first name and gender of the all the students who have more than one pet?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1", "external_knowledge": "None" }, { "question": "Find the last name of the student who has a cat that is age 3.", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the last name of the student who has a cat that is age 3.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'", "external_knowledge": "None" }, { "question": "What is the last name of the student who has a cat that is 3 years old?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the last name of the student who has a cat that is 3 years old?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'", "external_knowledge": "None" }, { "question": "Find the average age of students who do not have any pet .", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the average age of students who do not have any pet .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select avg(age) from student where stuid not in (select stuid from has_pet)", "external_knowledge": "None" }, { "question": "What is the average age for all students who do not own any pets ?", "schema": "CREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Student (\n StuID number, -- student id, example: [1001, 1002]\n LName text, -- last name, example: ['Smith', 'Kim']\n Fname text, -- first name, example: ['Linda', 'Tracy']\n Age number, -- example: [18, 19]\n Sex text, -- example: ['F', 'M']\n Major number, -- example: [600, 520]\n Advisor number, -- example: [1121, 7712]\n city_code text, -- example: ['BAL', 'HKG']\n PRIMARY KEY (StuID)\n);\n\nCREATE TABLE Has_Pet (\n StuID number, -- student id, example: [1001, 1002]\n PetID number, -- example: [2001, 2002]\n CONSTRAINT fk_has_pet_stuid FOREIGN KEY (StuID) REFERENCES Student (StuID),\n CONSTRAINT fk_has_pet_petid FOREIGN KEY (PetID) REFERENCES Pets (PetID)\n);\n\nCREATE TABLE Pets (\n PetID number, -- example: [2001, 2002]\n PetType text, -- example: ['cat', 'dog']\n pet_age number, -- example: [3, 2]\n weight number, -- example: [12.0, 13.4]\n PRIMARY KEY (PetID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average age for all students who do not own any pets ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select avg(age) from student where stuid not in (select stuid from has_pet)", "external_knowledge": "None" }, { "question": "How many continents are there?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many continents are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM CONTINENTS;", "external_knowledge": "None" }, { "question": "What is the number of continents?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of continents?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM CONTINENTS;", "external_knowledge": "None" }, { "question": "How many countries does each continent have? List the continent id, continent name and the number of countries.", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many countries does each continent have? List the continent id, continent name and the number of countries.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;", "external_knowledge": "None" }, { "question": "For each continent, list its id, name, and how many countries it has?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor each continent, list its id, name, and how many countries it has?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;", "external_knowledge": "None" }, { "question": "How many countries are listed?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many countries are listed?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM COUNTRIES;", "external_knowledge": "None" }, { "question": "How many countries exist?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many countries exist?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM COUNTRIES;", "external_knowledge": "None" }, { "question": "How many models does each car maker produce? List maker full name, id and the number.", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many models does each car maker produce? List maker full name, id and the number.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;", "external_knowledge": "None" }, { "question": "What is the full name of each car maker, along with its id and how many models it produces?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the full name of each car maker, along with its id and how many models it produces?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;", "external_knowledge": "None" }, { "question": "Which model of the car has the minimum horsepower?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich model of the car has the minimum horsepower?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1;", "external_knowledge": "None" }, { "question": "What is the model of the car with the smallest amount of horsepower?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the model of the car with the smallest amount of horsepower?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1;", "external_knowledge": "None" }, { "question": "Find the model of the car whose weight is below the average weight.", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the model of the car whose weight is below the average weight.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)", "external_knowledge": "None" }, { "question": "What is the model for the car with a weight smaller than the average?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the model for the car with a weight smaller than the average?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)", "external_knowledge": "None" }, { "question": "Find the name of the makers that produced some cars in the year of 1970?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the name of the makers that produced some cars in the year of 1970?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970';", "external_knowledge": "None" }, { "question": "What is the name of the different car makers who produced a car in 1970?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the different car makers who produced a car in 1970?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970';", "external_knowledge": "None" }, { "question": "Find the make and production time of the cars that were produced in the earliest year?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the make and production time of the cars that were produced in the earliest year?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Make , T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT min(YEAR) FROM CARS_DATA);", "external_knowledge": "None" }, { "question": "What is the maker of the carr produced in the earliest year and what year was it?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the maker of the carr produced in the earliest year and what year was it?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Make , T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT min(YEAR) FROM CARS_DATA);", "external_knowledge": "None" }, { "question": "Which distinct car models are the produced after 1980?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich distinct car models are the produced after 1980?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980;", "external_knowledge": "None" }, { "question": "What are the different models for the cards produced after 1980?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the different models for the cards produced after 1980?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980;", "external_knowledge": "None" }, { "question": "How many car makers are there in each continents? List the continent name and the count.", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many car makers are there in each continents? List the continent name and the count.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent;", "external_knowledge": "None" }, { "question": "What is the name of each continent and how many car makers are there in each one?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of each continent and how many car makers are there in each one?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent;", "external_knowledge": "None" }, { "question": "Which of the countries has the most car makers? List the country name.", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich of the countries has the most car makers? List the country name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1;", "external_knowledge": "None" }, { "question": "What is the name of the country with the most car makers?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the country with the most car makers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.CountryName FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId GROUP BY T1.Country ORDER BY Count(*) DESC LIMIT 1;", "external_knowledge": "None" }, { "question": "How many car models are produced by each maker ? Only list the count and the maker full name .", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many car models are produced by each maker ? Only list the count and the maker full name .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select count(*) , t2.fullname from model_list as t1 join car_makers as t2 on t1.maker = t2.id group by t2.id;", "external_knowledge": "None" }, { "question": "What is the number of car models that are produced by each maker and what is the id and full name of each maker?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of car models that are produced by each maker and what is the id and full name of each maker?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Count(*) , T2.FullName , T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id;", "external_knowledge": "None" }, { "question": "What is the accelerate of the car make amc hornet sportabout (sw)?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['amc', 'chevrolet', 'buick']\n Make text, -- example: ['amc hornet sportabout (sw)', 'amc hornet', 'chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['amc', 'chevrolet', 'buick']\n Make text, -- example: ['amc hornet sportabout (sw)', 'amc hornet', 'chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the accelerate of the car make amc hornet sportabout (sw)?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';", "external_knowledge": "None" }, { "question": "How much does the car accelerate that makes amc hornet sportabout (sw)?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['amc', 'chevrolet', 'buick']\n Make text, -- example: ['amc hornet sportabout (sw)', 'amc hornet', 'chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['amc', 'chevrolet', 'buick']\n Make text, -- example: ['amc hornet sportabout (sw)', 'amc hornet', 'chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow much does the car accelerate that makes amc hornet sportabout (sw)?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';", "external_knowledge": "None" }, { "question": "How many car makers are there in france?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['france', 'usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['france', 'usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many car makers are there in france?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';", "external_knowledge": "None" }, { "question": "What is the number of makers of care in France?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['france', 'usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['france', 'usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of makers of care in France?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france';", "external_knowledge": "None" }, { "question": "How many car models are produced in the usa?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many car models are produced in the usa?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa';", "external_knowledge": "None" }, { "question": "What is the count of the car models produced in the United States?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the count of the car models produced in the United States?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa';", "external_knowledge": "None" }, { "question": "What is the average miles per gallon(mpg) of the cars with 4 cylinders?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average miles per gallon(mpg) of the cars with 4 cylinders?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4;", "external_knowledge": "None" }, { "question": "What is the average miles per gallon of all the cards with 4 cylinders?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average miles per gallon of all the cards with 4 cylinders?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4;", "external_knowledge": "None" }, { "question": "What is the smallest weight of the car produced with 8 cylinders on 1974 ?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the smallest weight of the car produced with 8 cylinders on 1974 ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select min(weight) from cars_data where cylinders = 8 and year = 1974", "external_knowledge": "None" }, { "question": "What is the minimum weight of the car with 8 cylinders produced in 1974 ?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the minimum weight of the car with 8 cylinders produced in 1974 ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select min(weight) from cars_data where cylinders = 8 and year = 1974", "external_knowledge": "None" }, { "question": "What are all the makers and models?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are all the makers and models?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Maker , Model FROM MODEL_LIST;", "external_knowledge": "None" }, { "question": "What are the makers and models?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the makers and models?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Maker , Model FROM MODEL_LIST;", "external_knowledge": "None" }, { "question": "What are the countries having at least one car maker? List name and id.", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the countries having at least one car maker? List name and id.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1;", "external_knowledge": "None" }, { "question": "What are the names and ids of all countries with at least one car maker?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names and ids of all countries with at least one car maker?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1;", "external_knowledge": "None" }, { "question": "What is the number of the cars with horsepower more than 150?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of the cars with horsepower more than 150?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM CARS_DATA WHERE horsepower > 150;", "external_knowledge": "None" }, { "question": "What is the number of cars with a horsepower greater than 150?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of cars with a horsepower greater than 150?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM CARS_DATA WHERE horsepower > 150;", "external_knowledge": "None" }, { "question": "What is the average weight of cars each year?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average weight of cars each year?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(Weight) , YEAR FROM CARS_DATA GROUP BY YEAR;", "external_knowledge": "None" }, { "question": "What is the average weight and year for each year?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average weight and year for each year?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(Weight) , YEAR FROM CARS_DATA GROUP BY YEAR;", "external_knowledge": "None" }, { "question": "Which countries in europe have at least 3 car manufacturers?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['europe', 'america']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['europe', 'america']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich countries in europe have at least 3 car manufacturers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3;", "external_knowledge": "None" }, { "question": "What are the names of all European countries with at least 3 manufacturers?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of all European countries with at least 3 manufacturers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3;", "external_knowledge": "None" }, { "question": "What is the maximum horsepower and the make of the car models with 3 cylinders?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the maximum horsepower and the make of the car models with 3 cylinders?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1;", "external_knowledge": "None" }, { "question": "What is the largest amount of horsepower for the models with 3 cylinders and what make is it?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the largest amount of horsepower for the models with 3 cylinders and what make is it?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1;", "external_knowledge": "None" }, { "question": "Which model saves the most gasoline? That is to say, have the maximum miles per gallon.", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich model saves the most gasoline? That is to say, have the maximum miles per gallon.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1;", "external_knowledge": "None" }, { "question": "What is the car model with the highest mpg ?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the car model with the highest mpg ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select t1.model from car_names as t1 join cars_data as t2 on t1.makeid = t2.id order by t2.mpg desc limit 1;", "external_knowledge": "None" }, { "question": "What is the average horsepower of the cars before 1980?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average horsepower of the cars before 1980?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(horsepower) FROM CARS_DATA WHERE YEAR < 1980;", "external_knowledge": "None" }, { "question": "What is the average horsepower for all cars produced before 1980 ?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average horsepower for all cars produced before 1980 ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select avg(horsepower) from cars_data where year < 1980;", "external_knowledge": "None" }, { "question": "What is the average edispl of the cars of model volvo?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['volvo', 'amc', 'volkswagen']\n FullName text, -- example: ['Volvo', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['volvo', 'amc', 'volkswagen']\n FullName text, -- example: ['Volvo', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average edispl of the cars of model volvo?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';", "external_knowledge": "None" }, { "question": "What is the average edispl for all volvos?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['volvo', 'amc', 'volkswagen']\n FullName text, -- example: ['Volvo', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['volvo', 'amc', 'volkswagen']\n FullName text, -- example: ['Volvo', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average edispl for all volvos?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo';", "external_knowledge": "None" }, { "question": "What is the maximum accelerate for different number of cylinders?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the maximum accelerate for different number of cylinders?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders;", "external_knowledge": "None" }, { "question": "What is the maximum accelerate for all the different cylinders?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the maximum accelerate for all the different cylinders?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders;", "external_knowledge": "None" }, { "question": "Which model has the most version(make) of cars?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich model has the most version(make) of cars?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;", "external_knowledge": "None" }, { "question": "What model has the most different versions?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat model has the most different versions?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1;", "external_knowledge": "None" }, { "question": "How many cars have more than 4 cylinders?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many cars have more than 4 cylinders?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM CARS_DATA WHERE Cylinders > 4;", "external_knowledge": "None" }, { "question": "What is the number of cars with more than 4 cylinders?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of cars with more than 4 cylinders?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM CARS_DATA WHERE Cylinders > 4;", "external_knowledge": "None" }, { "question": "how many cars were produced in 1980?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nhow many cars were produced in 1980?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM CARS_DATA WHERE YEAR = 1980;", "external_knowledge": "None" }, { "question": "In 1980, how many cars were made?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nIn 1980, how many cars were made?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM CARS_DATA WHERE YEAR = 1980;", "external_knowledge": "None" }, { "question": "How many car models were produced by the maker with full name American Motor Company?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many car models were produced by the maker with full name American Motor Company?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';", "external_knowledge": "None" }, { "question": "What is the number of car models created by the car maker American Motor Company?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of car models created by the car maker American Motor Company?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company';", "external_knowledge": "None" }, { "question": "Which makers designed more than 3 car models? List full name and the id.", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich makers designed more than 3 car models? List full name and the id.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3;", "external_knowledge": "None" }, { "question": "What are the names and ids of all makers with more than 3 models?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names and ids of all makers with more than 3 models?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3;", "external_knowledge": "None" }, { "question": "Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['General Motors', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['General Motors', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich distinctive models are produced by maker with the full name General Motors or weighing more than 3500?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500;", "external_knowledge": "None" }, { "question": "What are the different models created by either the car maker General Motors or weighed more than 3500?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['General Motors', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['General Motors', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the different models created by either the car maker General Motors or weighed more than 3500?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500;", "external_knowledge": "None" }, { "question": "In which years cars were produced weighing no less than 3000 and no more than 4000 ?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nIn which years cars were produced weighing no less than 3000 and no more than 4000 ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select distinct year from cars_data where weight between 3000 and 4000;", "external_knowledge": "None" }, { "question": "What are the different years in which there were cars produced that weighed less than 4000 and also cars that weighted more than 3000 ?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the different years in which there were cars produced that weighed less than 4000 and also cars that weighted more than 3000 ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select distinct year from cars_data where weight between 3000 and 4000;", "external_knowledge": "None" }, { "question": "What is the horsepower of the car with the largest accelerate?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the horsepower of the car with the largest accelerate?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;", "external_knowledge": "None" }, { "question": "What is the horsepower of the car with the greatest accelerate?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the horsepower of the car with the greatest accelerate?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.horsepower FROM CARS_DATA AS T1 ORDER BY T1.accelerate DESC LIMIT 1;", "external_knowledge": "None" }, { "question": "For model volvo, how many cylinders does the car with the least accelerate have?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['volvo', 'amc', 'volkswagen']\n FullName text, -- example: ['Volvo', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['volvo', 'amc', 'volkswagen']\n FullName text, -- example: ['Volvo', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor model volvo, how many cylinders does the car with the least accelerate have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1;", "external_knowledge": "None" }, { "question": "For a volvo model, how many cylinders does the version with least accelerate have?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['volvo', 'amc', 'volkswagen']\n FullName text, -- example: ['Volvo', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['volvo', 'amc', 'volkswagen']\n FullName text, -- example: ['Volvo', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['volvo', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor a volvo model, how many cylinders does the version with least accelerate have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1;", "external_knowledge": "None" }, { "question": "How many cars have a larger accelerate than the car with the largest horsepower?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many cars have a larger accelerate than the car with the largest horsepower?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );", "external_knowledge": "None" }, { "question": "What is the number of cars with a greater accelerate than the one with the most horsepower?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of cars with a greater accelerate than the one with the most horsepower?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 );", "external_knowledge": "None" }, { "question": "How many countries has more than 2 car makers ?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many countries has more than 2 car makers ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2", "external_knowledge": "None" }, { "question": "What is the number of countries with more than 2 car makers ?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of countries with more than 2 car makers ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select count(*) from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 2", "external_knowledge": "None" }, { "question": "How many cars has over 6 cylinders?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many cars has over 6 cylinders?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6;", "external_knowledge": "None" }, { "question": "What is the number of carsw ith over 6 cylinders?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of carsw ith over 6 cylinders?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(*) FROM CARS_DATA WHERE Cylinders > 6;", "external_knowledge": "None" }, { "question": "For the cars with 4 cylinders, which model has the largest horsepower?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor the cars with 4 cylinders, which model has the largest horsepower?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1;", "external_knowledge": "None" }, { "question": "For all of the 4 cylinder cars, which model has the most horsepower?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor all of the 4 cylinder cars, which model has the most horsepower?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1;", "external_knowledge": "None" }, { "question": "Among the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? List the car makeid and make name.", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nAmong the cars with more than lowest horsepower, which ones do not have more than 3 cylinders? List the car makeid and make name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.MakeId , T2.Make FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Horsepower > (SELECT min(Horsepower) FROM CARS_DATA) AND T1.Cylinders <= 3;", "external_knowledge": "None" }, { "question": "Among the cars that do not have the minimum horsepower , what are the make ids and names of all those with less than 4 cylinders ?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nAmong the cars that do not have the minimum horsepower , what are the make ids and names of all those with less than 4 cylinders ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select t2.makeid , t2.make from cars_data as t1 join car_names as t2 on t1.id = t2.makeid where t1.horsepower > (select min(horsepower) from cars_data) and t1.cylinders < 4;", "external_knowledge": "None" }, { "question": "What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 ?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select max(mpg) from cars_data where cylinders = 8 or year < 1980", "external_knowledge": "None" }, { "question": "What is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980 ?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980 ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select max(mpg) from cars_data where cylinders = 8 or year < 1980", "external_knowledge": "None" }, { "question": "Which models are lighter than 3500 but not built by the 'Ford Motor Company'?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['ford', 'amc', 'volkswagen']\n FullName text, -- example: ['Ford Motor Company', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['ford', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['ford', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['ford', 'amc', 'volkswagen']\n FullName text, -- example: ['Ford Motor Company', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['ford', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['ford', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich models are lighter than 3500 but not built by the 'Ford Motor Company'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company';", "external_knowledge": "None" }, { "question": "What are the different models wthat are lighter than 3500 but were not built by the Ford Motor Company?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['ford', 'amc', 'volkswagen']\n FullName text, -- example: ['Ford Motor Company', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['ford', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['ford', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['ford', 'amc', 'volkswagen']\n FullName text, -- example: ['Ford Motor Company', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['ford', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['ford', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the different models wthat are lighter than 3500 but were not built by the Ford Motor Company?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company';", "external_knowledge": "None" }, { "question": "What are the name of the countries where there is not a single car maker?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the name of the countries where there is not a single car maker?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;", "external_knowledge": "None" }, { "question": "What are the names of the countries with no car makers?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the countries with no car makers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country;", "external_knowledge": "None" }, { "question": "Which are the car makers which produce at least 2 models and more than 3 car makers ? List the id and the maker .", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich are the car makers which produce at least 2 models and more than 3 car makers ? List the id and the maker .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select t1.id , t1.maker from car_makers as t1 join model_list as t2 on t1.id = t2.maker group by t1.id having count(*) >= 2 intersect select t1.id , t1.maker from car_makers as t1 join model_list as t2 on t1.id = t2.maker join car_names as t3 on t2.model = t3.model group by t1.id having count(*) > 3;", "external_knowledge": "None" }, { "question": "What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['amc', 'volkswagen']\n FullName text, -- example: ['American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) >= 2 INTERSECT SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model GROUP BY T1.Id HAVING count(*) > 3;", "external_knowledge": "None" }, { "question": "What are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['fiat', 'amc', 'volkswagen']\n FullName text, -- example: ['Fiat', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['fiat', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['fiat', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['fiat', 'amc', 'volkswagen']\n FullName text, -- example: ['Fiat', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['fiat', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['fiat', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING count(*) > 3 UNION SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WHERE T3.Model = 'fiat';", "external_knowledge": "None" }, { "question": "What are the ids and names of all countries that either have more than 3 car makers or produce fiat model ?", "schema": "CREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['fiat', 'amc', 'volkswagen']\n FullName text, -- example: ['Fiat', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['fiat', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['fiat', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE continents (\n ContId number, -- example: [1, 2]\n Continent text, -- example: ['america', 'europe']\n PRIMARY KEY (ContId)\n);\n\nCREATE TABLE countries (\n CountryId number, -- example: [1, 2]\n CountryName text, -- example: ['usa', 'germany']\n Continent number, -- example: [1, 2]\n PRIMARY KEY (CountryId),\n CONSTRAINT fk_countries_continent FOREIGN KEY (Continent) REFERENCES continents (ContId)\n);\n\nCREATE TABLE car_makers (\n Id number, -- example: [1, 2]\n Maker text, -- example: ['fiat', 'amc', 'volkswagen']\n FullName text, -- example: ['Fiat', 'American Motor Company', 'Volkswagen']\n Country text, -- example: ['1', '2']\n PRIMARY KEY (Id),\n CONSTRAINT fk_car_makers_country FOREIGN KEY (Country) REFERENCES countries (CountryId)\n);\n\nCREATE TABLE model_list (\n ModelId number, -- example: [1, 2]\n Maker number, -- example: [1, 2]\n Model text, -- example: ['fiat', 'amc', 'audi']\n PRIMARY KEY (ModelId),\n CONSTRAINT fk_model_list_maker FOREIGN KEY (Maker) REFERENCES car_makers (Id)\n);\n\nCREATE TABLE car_names (\n MakeId number, -- example: [1, 2]\n Model text, -- example: ['fiat', 'chevrolet', 'buick']\n Make text, -- example: ['chevrolet chevelle malibu', 'buick skylark 320']\n PRIMARY KEY (MakeId),\n CONSTRAINT fk_car_names_model FOREIGN KEY (Model) REFERENCES model_list (Model)\n);\n\nCREATE TABLE cars_data (\n Id number, -- example: [1, 2]\n MPG text, -- example: ['18', '15']\n Cylinders number, -- example: [8, 4]\n Edispl number, -- example: [307.0, 350.0]\n Horsepower text, -- example: ['130', '165']\n Weight number, -- example: [3504, 3693]\n Accelerate number, -- example: [12.0, 11.5]\n `Year` number, -- example: [1970, 1971]\n PRIMARY KEY (Id),\n CONSTRAINT fk_cars_data_id FOREIGN KEY (Id) REFERENCES car_names (MakeId)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids and names of all countries that either have more than 3 car makers or produce fiat model ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country group by t1.countryid having count(*) > 3 union select t1.countryid , t1.countryname from countries as t1 join car_makers as t2 on t1.countryid = t2.country join model_list as t3 on t2.id = t3.maker where t3.model = 'fiat';", "external_knowledge": "None" }, { "question": "Which country does Airline \"JetBlue Airways\" belong to?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['JetBlue Airways', 'United Airlines', 'US Airways']\n Abbreviation text, -- example: ['JetBlue', 'UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['JetBlue Airways', 'United Airlines', 'US Airways']\n Abbreviation text, -- example: ['JetBlue', 'UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich country does Airline \"JetBlue Airways\" belong to?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Country FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", "external_knowledge": "None" }, { "question": "What country is Jetblue Airways affiliated with?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['JetBlue Airways', 'United Airlines', 'US Airways']\n Abbreviation text, -- example: ['JetBlue', 'UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['JetBlue Airways', 'United Airlines', 'US Airways']\n Abbreviation text, -- example: ['JetBlue', 'UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat country is Jetblue Airways affiliated with?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Country FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", "external_knowledge": "None" }, { "question": "What is the abbreviation of Airline \"JetBlue Airways\"?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['JetBlue Airways', 'United Airlines', 'US Airways']\n Abbreviation text, -- example: ['JetBlue', 'UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['JetBlue Airways', 'United Airlines', 'US Airways']\n Abbreviation text, -- example: ['JetBlue', 'UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the abbreviation of Airline \"JetBlue Airways\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Abbreviation FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", "external_knowledge": "None" }, { "question": "Which abbreviation corresponds to Jetblue Airways?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['JetBlue Airways', 'United Airlines', 'US Airways']\n Abbreviation text, -- example: ['JetBlue', 'UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['JetBlue Airways', 'United Airlines', 'US Airways']\n Abbreviation text, -- example: ['JetBlue', 'UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich abbreviation corresponds to Jetblue Airways?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Abbreviation FROM AIRLINES WHERE Airline = \"JetBlue Airways\"", "external_knowledge": "None" }, { "question": "List all airline names and their abbreviations in \"USA\".", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList all airline names and their abbreviations in \"USA\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Airline , Abbreviation FROM AIRLINES WHERE Country = \"USA\"", "external_knowledge": "None" }, { "question": "What are the airline names and abbreviations for airlines in the USA?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the airline names and abbreviations for airlines in the USA?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Airline , Abbreviation FROM AIRLINES WHERE Country = \"USA\"", "external_knowledge": "None" }, { "question": "List the airport code and name in the city of Anthony.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Anthony ', 'Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Anthony ', 'Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Anthony ', 'Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Anthony ', 'Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the airport code and name in the city of Anthony.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = \"Anthony\"", "external_knowledge": "None" }, { "question": "Give the airport code and airport name corresonding to the city Anthony.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Anthony ', 'Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Anthony ', 'Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Anthony ', 'Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Anthony ', 'Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the airport code and airport name corresonding to the city Anthony.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT AirportCode , AirportName FROM AIRPORTS WHERE city = \"Anthony\"", "external_knowledge": "None" }, { "question": "How many airlines do we have?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many airlines do we have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM AIRLINES", "external_knowledge": "None" }, { "question": "What is the total number of airlines?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the total number of airlines?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM AIRLINES", "external_knowledge": "None" }, { "question": "How many airports do we have?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many airports do we have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM AIRPORTS", "external_knowledge": "None" }, { "question": "Return the number of airports.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the number of airports.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM AIRPORTS", "external_knowledge": "None" }, { "question": "How many flights do we have?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many flights do we have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS", "external_knowledge": "None" }, { "question": "Return the number of flights.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the number of flights.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS", "external_knowledge": "None" }, { "question": "Which airline has abbreviation 'UAL'?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich airline has abbreviation 'UAL'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Airline FROM AIRLINES WHERE Abbreviation = \"UAL\"", "external_knowledge": "None" }, { "question": "Give the airline with abbreviation 'UAL'.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the airline with abbreviation 'UAL'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Airline FROM AIRLINES WHERE Abbreviation = \"UAL\"", "external_knowledge": "None" }, { "question": "How many airlines are from USA?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many airlines are from USA?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM AIRLINES WHERE Country = \"USA\"", "external_knowledge": "None" }, { "question": "Return the number of airlines in the USA.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the number of airlines in the USA.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM AIRLINES WHERE Country = \"USA\"", "external_knowledge": "None" }, { "question": "Which city and country is the Alton airport at?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Alton ', 'Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Alton ', 'Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Alton ', 'Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Alton ', 'Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich city and country is the Alton airport at?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"", "external_knowledge": "None" }, { "question": "Give the city and country for the Alton airport.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Alton ', 'Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Alton ', 'Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Alton ', 'Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Alton ', 'Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the city and country for the Alton airport.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"", "external_knowledge": "None" }, { "question": "What is the airport name for airport 'AKO'?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AKO', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AKO', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the airport name for airport 'AKO'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT AirportName FROM AIRPORTS WHERE AirportCode = \"AKO\"", "external_knowledge": "None" }, { "question": "Return the name of the airport with code 'AKO'.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AKO', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AKO', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the name of the airport with code 'AKO'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT AirportName FROM AIRPORTS WHERE AirportCode = \"AKO\"", "external_knowledge": "None" }, { "question": "What are airport names at City 'Aberdeen'?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are airport names at City 'Aberdeen'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT AirportName FROM AIRPORTS WHERE City = \"Aberdeen\"", "external_knowledge": "None" }, { "question": "What are the names of airports in Aberdeen?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of airports in Aberdeen?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT AirportName FROM AIRPORTS WHERE City = \"Aberdeen\"", "external_knowledge": "None" }, { "question": "How many flights depart from 'APG'?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many flights depart from 'APG'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"", "external_knowledge": "None" }, { "question": "Count the number of flights departing from 'APG'.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of flights departing from 'APG'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"", "external_knowledge": "None" }, { "question": "How many flights have destination ATO?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['ATO', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' ATO', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ATO', ' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['ATO', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' ATO', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ATO', ' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many flights have destination ATO?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"", "external_knowledge": "None" }, { "question": "Count the number of flights into ATO.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['ATO', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' ATO', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ATO', ' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['ATO', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' ATO', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ATO', ' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of flights into ATO.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"", "external_knowledge": "None" }, { "question": "How many flights depart from City Aberdeen?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many flights depart from City Aberdeen?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "external_knowledge": "None" }, { "question": "Return the number of flights departing from Aberdeen.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the number of flights departing from Aberdeen.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "external_knowledge": "None" }, { "question": "How many flights arriving in Aberdeen city?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many flights arriving in Aberdeen city?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "external_knowledge": "None" }, { "question": "Return the number of flights arriving in Aberdeen.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the number of flights arriving in Aberdeen.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "external_knowledge": "None" }, { "question": "How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Ashley ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Ashley ', 'Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Ashley ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Ashley ', 'Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many flights depart from City 'Aberdeen' and have destination City 'Ashley'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"", "external_knowledge": "None" }, { "question": "How many flights fly from Aberdeen to Ashley?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Ashley ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Ashley ', 'Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Ashley ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Ashley ', 'Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many flights fly from Aberdeen to Ashley?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"", "external_knowledge": "None" }, { "question": "How many flights does airline 'JetBlue Airways' have?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['JetBlue Airways', 'United Airlines', 'US Airways']\n Abbreviation text, -- example: ['JetBlue', 'UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['JetBlue Airways', 'United Airlines', 'US Airways']\n Abbreviation text, -- example: ['JetBlue', 'UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many flights does airline 'JetBlue Airways' have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", "external_knowledge": "None" }, { "question": "Give the number of Jetblue Airways flights.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['JetBlue Airways', 'United Airlines', 'US Airways']\n Abbreviation text, -- example: ['JetBlue', 'UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['JetBlue Airways', 'United Airlines', 'US Airways']\n Abbreviation text, -- example: ['JetBlue', 'UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the number of Jetblue Airways flights.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", "external_knowledge": "None" }, { "question": "How many 'United Airlines' flights go to Airport 'ASY'?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['ASY', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['ASY', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many 'United Airlines' flights go to Airport 'ASY'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"", "external_knowledge": "None" }, { "question": "Count the number of United Airlines flights arriving in ASY Airport.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['ASY', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' ASY', ' APG']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['ASY', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' ASY', ' APG']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of United Airlines flights arriving in ASY Airport.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"", "external_knowledge": "None" }, { "question": "How many 'United Airlines' flights depart from Airport 'AHD'?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AHD', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AHD', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many 'United Airlines' flights depart from Airport 'AHD'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.SourceAirport = \"AHD\"", "external_knowledge": "None" }, { "question": "Return the number of United Airlines flights leaving from AHD Airport.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AHD', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' AHD', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' AHD', ' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AHD', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' AHD', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' AHD', ' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the number of United Airlines flights leaving from AHD Airport.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.SourceAirport = \"AHD\"", "external_knowledge": "None" }, { "question": "How many United Airlines flights go to City 'Aberdeen'?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many United Airlines flights go to City 'Aberdeen'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = \"Aberdeen\" AND T3.Airline = \"United Airlines\"", "external_knowledge": "None" }, { "question": "Count the number of United Airlines flights that arrive in Aberdeen.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of United Airlines flights that arrive in Aberdeen.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = \"Aberdeen\" AND T3.Airline = \"United Airlines\"", "external_knowledge": "None" }, { "question": "Which city has most number of arriving flights?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich city has most number of arriving flights?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which city has the most frequent destination airport?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich city has the most frequent destination airport?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which city has most number of departing flights?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich city has most number of departing flights?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which city is the most frequent source airport?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich city is the most frequent source airport?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the code of airport that has the highest number of flights?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the code of airport that has the highest number of flights?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the airport code of the airport with the most flights?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the airport code of the airport with the most flights?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the code of airport that has fewest number of flights?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the code of airport that has fewest number of flights?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1", "external_knowledge": "None" }, { "question": "Give the code of the airport with the least flights.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the code of the airport with the least flights.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1", "external_knowledge": "None" }, { "question": "Which airline has most number of flights?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich airline has most number of flights?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What airline serves the most flights?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat airline serves the most flights?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the abbreviation and country of the airline that has fewest number of flights?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the abbreviation and country of the airline that has fewest number of flights?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1", "external_knowledge": "None" }, { "question": "What is the abbreviation of the airilne has the fewest flights and what country is it in?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the abbreviation of the airilne has the fewest flights and what country is it in?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1", "external_knowledge": "None" }, { "question": "What are airlines that have some flight departing from airport 'AHD'?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AHD', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AHD', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are airlines that have some flight departing from airport 'AHD'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"", "external_knowledge": "None" }, { "question": "Which airlines have a flight with source airport AHD?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AHD', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' AHD', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' AHD', ' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AHD', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' AHD', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' AHD', ' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich airlines have a flight with source airport AHD?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"", "external_knowledge": "None" }, { "question": "What are airlines that have flights arriving at airport 'AHD'?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AHD', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AHD', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are airlines that have flights arriving at airport 'AHD'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"", "external_knowledge": "None" }, { "question": "Which airlines have a flight with destination airport AHD?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AHD', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' AHD', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' AHD', ' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AHD', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' AHD', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' AHD', ' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich airlines have a flight with destination airport AHD?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"", "external_knowledge": "None" }, { "question": "Find all airlines that have flights from both airports 'APG' and 'CVO'.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['CVO', 'APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['CVO', 'APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind all airlines that have flights from both airports 'APG' and 'CVO'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\"", "external_knowledge": "None" }, { "question": "Which airlines have departing flights from both APG and CVO airports?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['CVO', 'APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' CVO', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' CVO', ' APG', ' ASY']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['CVO', 'APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' CVO', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' CVO', ' APG', ' ASY']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich airlines have departing flights from both APG and CVO airports?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\"", "external_knowledge": "None" }, { "question": "Find all airlines that have flights from airport 'CVO' but not from 'APG'.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'CVO', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'CVO', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind all airlines that have flights from airport 'CVO' but not from 'APG'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"", "external_knowledge": "None" }, { "question": "Which airlines have departures from CVO but not from APG airports?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'CVO', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' CVO', ' ASY']\n DestAirport text, -- destination airport, example: [' APG', ' CVO', ' ASY']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'CVO', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' CVO', ' ASY']\n DestAirport text, -- destination airport, example: [' APG', ' CVO', ' ASY']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich airlines have departures from CVO but not from APG airports?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"", "external_knowledge": "None" }, { "question": "Find all airlines that have at least 10 flights.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind all airlines that have at least 10 flights.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10", "external_knowledge": "None" }, { "question": "Which airlines have at least 10 flights?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich airlines have at least 10 flights?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10", "external_knowledge": "None" }, { "question": "Find all airlines that have fewer than 200 flights.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind all airlines that have fewer than 200 flights.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200", "external_knowledge": "None" }, { "question": "Which airlines have less than 200 flights?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich airlines have less than 200 flights?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200", "external_knowledge": "None" }, { "question": "What are flight numbers of Airline \"United Airlines\"?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are flight numbers of Airline \"United Airlines\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"", "external_knowledge": "None" }, { "question": "Which flight numbers correspond to United Airlines flights?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich flight numbers correspond to United Airlines flights?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"", "external_knowledge": "None" }, { "question": "What are flight numbers of flights departing from Airport \"APG\"?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are flight numbers of flights departing from Airport \"APG\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"", "external_knowledge": "None" }, { "question": "Give the flight numbers of flights leaving from APG.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' APG', ' ASY']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' APG', ' ASY']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the flight numbers of flights leaving from APG.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"", "external_knowledge": "None" }, { "question": "What are flight numbers of flights arriving at Airport \"APG\"?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are flight numbers of flights arriving at Airport \"APG\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"", "external_knowledge": "None" }, { "question": "Give the flight numbers of flights landing at APG.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' APG', ' ASY']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['APG', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' APG', ' ASY']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the flight numbers of flights landing at APG.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"", "external_knowledge": "None" }, { "question": "What are flight numbers of flights departing from City \"Aberdeen \"?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are flight numbers of flights departing from City \"Aberdeen \"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "external_knowledge": "None" }, { "question": "Give the flight numbers of flights leaving from Aberdeen.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the flight numbers of flights leaving from Aberdeen.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "external_knowledge": "None" }, { "question": "What are flight numbers of flights arriving at City \"Aberdeen\"?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are flight numbers of flights arriving at City \"Aberdeen\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "external_knowledge": "None" }, { "question": "Give the flight numbers of flights arriving in Aberdeen.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the flight numbers of flights arriving in Aberdeen.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "external_knowledge": "None" }, { "question": "Find the number of flights landing in the city of Aberdeen or Abilene.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of flights landing in the city of Aberdeen or Abilene.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", "external_knowledge": "None" }, { "question": "How many flights land in Aberdeen or Abilene?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many flights land in Aberdeen or Abilene?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", "external_knowledge": "None" }, { "question": "Find the name of airports which do not have any flight in and out.", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['ANY', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' ANY', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ANY', ' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['ANY', 'AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' ANY', ' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ANY', ' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the name of airports which do not have any flight in and out.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)", "external_knowledge": "None" }, { "question": "Which airports do not have departing or arriving flights?", "schema": "CREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE airlines (\n uid number, -- airline id, example: [1, 2]\n Airline text, -- airline name, example: ['United Airlines', 'US Airways']\n Abbreviation text, -- example: ['UAL', 'USAir']\n Country text, -- example: ['USA']\n PRIMARY KEY (uid)\n);\n\nCREATE TABLE airports (\n City text, -- example: ['Aberdeen ', 'Abilene ']\n AirportCode text, -- example: ['AAF', 'ABI']\n AirportName text, -- example: ['Phillips AAF ', 'Municipal ']\n Country text, -- example: ['United States ']\n CountryAbbrev text, -- example: ['US ', 'US']\n PRIMARY KEY (AirportCode)\n);\n\nCREATE TABLE flights (\n Airline number, -- example: [1, 2]\n FlightNo number, -- flight number, example: [28, 29]\n SourceAirport text, -- example: [' APG', ' ASY']\n DestAirport text, -- destination airport, example: [' ASY', ' APG']\n PRIMARY KEY (Airline),\n CONSTRAINT fk_flights_sourceairport FOREIGN KEY (SourceAirport) REFERENCES airports (AirportCode),\n CONSTRAINT fk_flights_destairport FOREIGN KEY (DestAirport) REFERENCES airports (AirportCode)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich airports do not have departing or arriving flights?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)", "external_knowledge": "None" }, { "question": "How many employees are there?", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many employees are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM employee", "external_knowledge": "None" }, { "question": "Count the number of employees", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of employees\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM employee", "external_knowledge": "None" }, { "question": "Sort employee names by their age in ascending order.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nSort employee names by their age in ascending order.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM employee ORDER BY age", "external_knowledge": "None" }, { "question": "List the names of employees and sort in ascending order of age.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the names of employees and sort in ascending order of age.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM employee ORDER BY age", "external_knowledge": "None" }, { "question": "What is the number of employees from each city?", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of employees from each city?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , city FROM employee GROUP BY city", "external_knowledge": "None" }, { "question": "Count the number of employees for each city.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of employees for each city.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , city FROM employee GROUP BY city", "external_knowledge": "None" }, { "question": "Which cities do more than one employee under age 30 come from?", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich cities do more than one employee under age 30 come from?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1", "external_knowledge": "None" }, { "question": "Find the cities that have more than one employee under age 30.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the cities that have more than one employee under age 30.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1", "external_knowledge": "None" }, { "question": "Find the number of shops in each location.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of shops in each location.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION", "external_knowledge": "None" }, { "question": "How many shops are there in each location?", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many shops are there in each location?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , LOCATION FROM shop GROUP BY LOCATION", "external_knowledge": "None" }, { "question": "Find the manager name and district of the shop whose number of products is the largest.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the manager name and district of the shop whose number of products is the largest.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What are the manager name and district of the shop that sells the largest number of products?", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the manager name and district of the shop that sells the largest number of products?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1", "external_knowledge": "None" }, { "question": "find the minimum and maximum number of products of all stores.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nfind the minimum and maximum number of products of all stores.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT min(Number_products) , max(Number_products) FROM shop", "external_knowledge": "None" }, { "question": "What are the minimum and maximum number of products across all the shops?", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the minimum and maximum number of products across all the shops?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT min(Number_products) , max(Number_products) FROM shop", "external_knowledge": "None" }, { "question": "Return the name, location and district of all shops in descending order of number of products.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the name, location and district of all shops in descending order of number of products.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC", "external_knowledge": "None" }, { "question": "Sort all the shops by number products in descending order, and return the name, location and district of each shop.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nSort all the shops by number products in descending order, and return the name, location and district of each shop.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , LOCATION , district FROM shop ORDER BY number_products DESC", "external_knowledge": "None" }, { "question": "Find the names of stores whose number products is more than the average number of products.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the names of stores whose number products is more than the average number of products.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop)", "external_knowledge": "None" }, { "question": "Which shops' number products is above the average? Give me the shop names.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich shops' number products is above the average? Give me the shop names.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM shop WHERE number_products > (SELECT avg(number_products) FROM shop)", "external_knowledge": "None" }, { "question": "find the name of employee who was awarded the most times in the evaluation.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nfind the name of employee who was awarded the most times in the evaluation.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which employee received the most awards in evaluations? Give me the employee name.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich employee received the most awards in evaluations? Give me the employee name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the name of the employee who got the highest one time bonus.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the name of the employee who got the highest one time bonus.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which employee received the biggest bonus? Give me the employee name.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich employee received the biggest bonus? Give me the employee name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the names of employees who never won any award in the evaluation.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the names of employees who never won any award in the evaluation.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)", "external_knowledge": "None" }, { "question": "What are the names of the employees who never received any evaluation?", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the employees who never received any evaluation?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)", "external_knowledge": "None" }, { "question": "What is the name of the shop that is hiring the largest number of employees?", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the shop that is hiring the largest number of employees?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which shop has the most employees? Give me the shop name.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich shop has the most employees? Give me the shop name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the name of the shops that do not hire any employee.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the name of the shops that do not hire any employee.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)", "external_knowledge": "None" }, { "question": "Which shops run with no employees? Find the shop names", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich shops run with no employees? Find the shop names\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM hiring)", "external_knowledge": "None" }, { "question": "Find the number of employees hired in each shop; show the shop name as well.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of employees hired in each shop; show the shop name as well.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name", "external_knowledge": "None" }, { "question": "For each shop, return the number of employees working there and the name of the shop.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor each shop, return the number of employees working there and the name of the shop.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name", "external_knowledge": "None" }, { "question": "What is total bonus given in all evaluations?", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is total bonus given in all evaluations?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(bonus) FROM evaluation", "external_knowledge": "None" }, { "question": "Find the total amount of bonus given in all the evaluations.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the total amount of bonus given in all the evaluations.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(bonus) FROM evaluation", "external_knowledge": "None" }, { "question": "Give me all the information about hiring.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive me all the information about hiring.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT * FROM hiring", "external_knowledge": "None" }, { "question": "What is all the information about hiring?", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is all the information about hiring?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT * FROM hiring", "external_knowledge": "None" }, { "question": "Which district has both stores with less than 3000 products and stores with more than 10000 products?", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich district has both stores with less than 3000 products and stores with more than 10000 products?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000", "external_knowledge": "None" }, { "question": "Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000", "external_knowledge": "None" }, { "question": "How many different store locations are there?", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many different store locations are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT LOCATION) FROM shop", "external_knowledge": "None" }, { "question": "Count the number of distinct store locations.", "schema": "CREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE employee (\n Employee_ID number, -- example: [1, 2]\n Name text, -- example: ['George Chuter', 'Lee Mears']\n Age number, -- example: [23, 29]\n City text, -- example: ['Bristol', 'Bath']\n PRIMARY KEY (Employee_ID)\n);\n\nCREATE TABLE shop (\n Shop_ID number, -- example: [1, 2]\n Name text, -- example: ['FC Haka', 'HJK']\n Location text, -- example: ['Valkeakoski', 'Helsinki']\n District text, -- example: ['Tehtaan kenttä', 'Finnair Stadium']\n Number_products number, -- example: [3516, 10770]\n Manager_name text, -- example: ['Olli Huttunen', 'Antti Muurinen']\n PRIMARY KEY (Shop_ID)\n);\n\nCREATE TABLE hiring (\n Shop_ID number, -- example: [1, 8]\n Employee_ID number, -- example: [1, 2]\n Start_from text, -- example: ['2009', '2003']\n Is_full_time others, -- example: ['T', 'F']\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_hiring_shop_id FOREIGN KEY (Shop_ID) REFERENCES shop (Shop_ID),\n CONSTRAINT fk_hiring_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\n\nCREATE TABLE evaluation (\n Employee_ID text, -- example: ['1', '10']\n Year_awarded text, -- example: ['2011', '2016']\n Bonus number, -- example: [3000.0, 3200.0]\n PRIMARY KEY (Employee_ID),\n CONSTRAINT fk_evaluation_employee_id FOREIGN KEY (Employee_ID) REFERENCES employee (Employee_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of distinct store locations.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT LOCATION) FROM shop", "external_knowledge": "None" }, { "question": "How many documents do we have?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many documents do we have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Documents", "external_knowledge": "None" }, { "question": "Count the number of documents.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of documents.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Documents", "external_knowledge": "None" }, { "question": "List document IDs, document names, and document descriptions for all documents.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList document IDs, document names, and document descriptions for all documents.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id , document_name , document_description FROM Documents", "external_knowledge": "None" }, { "question": "What are the ids, names, and descriptions for all documents?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids, names, and descriptions for all documents?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id , document_name , document_description FROM Documents", "external_knowledge": "None" }, { "question": "What is the document name and template id for document with description with the letter 'w' in it?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['w', 'n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['w', 'n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the document name and template id for document with description with the letter 'w' in it?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"", "external_knowledge": "None" }, { "question": "Return the names and template ids for documents that contain the letter w in their description.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['w', 'n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['w', 'n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the names and template ids for documents that contain the letter w in their description.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"", "external_knowledge": "None" }, { "question": "What is the document id, template id and description for document named \"Robbin CV\"?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['CV', 'AD', 'BK']\n Template_Type_Description text, -- example: ['CV', 'Presentation']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['CV', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Robbin CV', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['CV', 'AD', 'BK']\n Template_Type_Description text, -- example: ['CV', 'Presentation']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['CV', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Robbin CV', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the document id, template id and description for document named \"Robbin CV\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = \"Robbin CV\"", "external_knowledge": "None" }, { "question": "Return the document id, template id, and description for the document with the name Robbin CV.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['CV', 'AD', 'BK']\n Template_Type_Description text, -- example: ['CV', 'Presentation']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['CV', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Robbin CV', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['CV', 'AD', 'BK']\n Template_Type_Description text, -- example: ['CV', 'Presentation']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['CV', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Robbin CV', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the document id, template id, and description for the document with the name Robbin CV.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = \"Robbin CV\"", "external_knowledge": "None" }, { "question": "How many different templates do all document use?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many different templates do all document use?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT template_id) FROM Documents", "external_knowledge": "None" }, { "question": "Count the number of different templates used for documents.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of different templates used for documents.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT template_id) FROM Documents", "external_knowledge": "None" }, { "question": "How many documents are using the template with type code 'PPT'?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['PPT', 'AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PPT', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['PPT', 'AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PPT', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many documents are using the template with type code 'PPT'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'", "external_knowledge": "None" }, { "question": "Count the number of documents that use the PPT template type.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['PPT', 'AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PPT', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['PPT', 'AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PPT', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of documents that use the PPT template type.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'", "external_knowledge": "None" }, { "question": "Show all template ids and number of documents using each template.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all template ids and number of documents using each template.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_id , count(*) FROM Documents GROUP BY template_id", "external_knowledge": "None" }, { "question": "What are all different template ids used for documents, and how many times were each of them used?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are all different template ids used for documents, and how many times were each of them used?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_id , count(*) FROM Documents GROUP BY template_id", "external_knowledge": "None" }, { "question": "What is the id and type code for the template used by the most documents?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the id and type code for the template used by the most documents?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Return the id and type code of the template that is used for the greatest number of documents.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the id and type code of the template that is used for the greatest number of documents.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Show ids for all templates that are used by more than one document.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow ids for all templates that are used by more than one document.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1", "external_knowledge": "None" }, { "question": "What are the template ids of any templates used in more than a single document?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the template ids of any templates used in more than a single document?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1", "external_knowledge": "None" }, { "question": "Show ids for all templates not used by any document.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow ids for all templates not used by any document.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents", "external_knowledge": "None" }, { "question": "What are the ids for templates that are not used in any documents?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids for templates that are not used in any documents?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents", "external_knowledge": "None" }, { "question": "How many templates do we have?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many templates do we have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Templates", "external_knowledge": "None" }, { "question": "Count the number of templates.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of templates.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Templates", "external_knowledge": "None" }, { "question": "Show template ids, version numbers, and template type codes for all templates.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow template ids, version numbers, and template type codes for all templates.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_id , version_number , template_type_code FROM Templates", "external_knowledge": "None" }, { "question": "What are the ids, version numbers, and type codes for each template?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids, version numbers, and type codes for each template?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_id , version_number , template_type_code FROM Templates", "external_knowledge": "None" }, { "question": "Show all distinct template type codes for all templates.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all distinct template type codes for all templates.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT template_type_code FROM Templates", "external_knowledge": "None" }, { "question": "What are the different template type codes?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the different template type codes?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT template_type_code FROM Templates", "external_knowledge": "None" }, { "question": "What are the ids of templates with template type code PP or PPT?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['PPT', 'PP', 'AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PPT', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['PPT', 'PP', 'AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PPT', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids of templates with template type code PP or PPT?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_id FROM Templates WHERE template_type_code = \"PP\" OR template_type_code = \"PPT\"", "external_knowledge": "None" }, { "question": "Return the ids of templates that have the code PP or PPT.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['PPT', 'PP', 'AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PPT', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['PPT', 'PP', 'AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PPT', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the ids of templates that have the code PP or PPT.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_id FROM Templates WHERE template_type_code = \"PP\" OR template_type_code = \"PPT\"", "external_knowledge": "None" }, { "question": "How many templates have template type code CV?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['CV', 'AD', 'BK']\n Template_Type_Description text, -- example: ['CV', 'Presentation']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['CV', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['CV', 'AD', 'BK']\n Template_Type_Description text, -- example: ['CV', 'Presentation']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['CV', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many templates have template type code CV?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"", "external_knowledge": "None" }, { "question": "Count the number of templates of the type CV.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['CV', 'AD', 'BK']\n Template_Type_Description text, -- example: ['CV', 'Presentation']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['CV', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['CV', 'AD', 'BK']\n Template_Type_Description text, -- example: ['CV', 'Presentation']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['CV', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of templates of the type CV.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"", "external_knowledge": "None" }, { "question": "What is the version number and template type code for the template with version number later than 5?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the version number and template type code for the template with version number later than 5?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5", "external_knowledge": "None" }, { "question": "Return the version numbers and template type codes of templates with a version number greater than 5.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the version numbers and template type codes of templates with a version number greater than 5.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5", "external_knowledge": "None" }, { "question": "Show all template type codes and number of templates for each.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all template type codes and number of templates for each.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code", "external_knowledge": "None" }, { "question": "What are the different template type codes, and how many templates correspond to each?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the different template type codes, and how many templates correspond to each?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code", "external_knowledge": "None" }, { "question": "Which template type code has most number of templates?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich template type code has most number of templates?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Return the type code of the template type that the most templates belong to.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the type code of the template type that the most templates belong to.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Show all template type codes with less than three templates.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all template type codes with less than three templates.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3", "external_knowledge": "None" }, { "question": "What are the codes of template types that have fewer than 3 templates?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the codes of template types that have fewer than 3 templates?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3", "external_knowledge": "None" }, { "question": "What the smallest version number and its template type code?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat the smallest version number and its template type code?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT min(Version_Number) , template_type_code FROM Templates", "external_knowledge": "None" }, { "question": "Return the lowest version number, along with its corresponding template type code.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the lowest version number, along with its corresponding template type code.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT min(Version_Number) , template_type_code FROM Templates", "external_knowledge": "None" }, { "question": "What is the template type code of the template used by document with the name \"Data base\"?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Data base', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Data base', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the template type code of the template used by document with the name \"Data base\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = \"Data base\"", "external_knowledge": "None" }, { "question": "Return the template type code of the template that is used by a document named Data base.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Data base', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Data base', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the template type code of the template that is used by a document named Data base.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = \"Data base\"", "external_knowledge": "None" }, { "question": "Show all document names using templates with template type code BK.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['BK', 'AD']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['BK', 'PP']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['BK', 'AD']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['BK', 'PP']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all document names using templates with template type code BK.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = \"BK\"", "external_knowledge": "None" }, { "question": "What are the names of documents that use templates with the code BK?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['BK', 'AD']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['BK', 'PP']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['BK', 'AD']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['BK', 'PP']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of documents that use templates with the code BK?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = \"BK\"", "external_knowledge": "None" }, { "question": "Show all template type codes and the number of documents using each type.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all template type codes and the number of documents using each type.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code", "external_knowledge": "None" }, { "question": "What are the different template type codes, and how many documents use each type?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the different template type codes, and how many documents use each type?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code", "external_knowledge": "None" }, { "question": "Which template type code is used by most number of documents?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich template type code is used by most number of documents?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Return the code of the template type that is most commonly used in documents.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the code of the template type that is most commonly used in documents.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Show all template type codes that are not used by any document.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all template type codes that are not used by any document.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", "external_knowledge": "None" }, { "question": "What are the codes of template types that are not used for any document?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the codes of template types that are not used for any document?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", "external_knowledge": "None" }, { "question": "Show all template type codes and descriptions.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all template type codes and descriptions.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_code , template_type_description FROM Ref_template_types", "external_knowledge": "None" }, { "question": "What are the type codes and descriptions for all template types?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the type codes and descriptions for all template types?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_code , template_type_description FROM Ref_template_types", "external_knowledge": "None" }, { "question": "What is the template type descriptions for template type code \"AD\".", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['AD', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['AD', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the template type descriptions for template type code \"AD\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_description FROM Ref_template_types WHERE template_type_code = \"AD\"", "external_knowledge": "None" }, { "question": "Return the template type description of the template type with the code AD.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['AD', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['AD', 'PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the template type description of the template type with the code AD.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_description FROM Ref_template_types WHERE template_type_code = \"AD\"", "external_knowledge": "None" }, { "question": "What is the template type code for template type description \"Book\".", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Book', 'Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Book', 'Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the template type code for template type description \"Book\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_code FROM Ref_template_types WHERE template_type_description = \"Book\"", "external_knowledge": "None" }, { "question": "Return the type code of the template type with the description \"Book\".", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Book', 'Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Book', 'Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the type code of the template type with the description \"Book\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT template_type_code FROM Ref_template_types WHERE template_type_description = \"Book\"", "external_knowledge": "None" }, { "question": "What are the distinct template type descriptions for the templates ever used by any document?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the distinct template type descriptions for the templates ever used by any document?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID", "external_knowledge": "None" }, { "question": "Return the different descriptions for templates that have been used in a document.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the different descriptions for templates that have been used in a document.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID", "external_knowledge": "None" }, { "question": "What are the template ids with template type description \"Presentation\".", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the template ids with template type description \"Presentation\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = \"Presentation\"", "external_knowledge": "None" }, { "question": "Return the ids corresponding to templates with the description 'Presentation'.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the ids corresponding to templates with the description 'Presentation'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = \"Presentation\"", "external_knowledge": "None" }, { "question": "How many paragraphs in total?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many paragraphs in total?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Paragraphs", "external_knowledge": "None" }, { "question": "Count the number of paragraphs.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of paragraphs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Paragraphs", "external_knowledge": "None" }, { "question": "How many paragraphs for the document with name 'Summer Show'?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Summer Show', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Summer Show', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many paragraphs for the document with name 'Summer Show'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", "external_knowledge": "None" }, { "question": "Count the number of paragraphs in the document named 'Summer Show'.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Summer Show', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Summer Show', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of paragraphs in the document named 'Summer Show'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", "external_knowledge": "None" }, { "question": "Show paragraph details for paragraph with text 'Korea ' .", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow paragraph details for paragraph with text 'Korea ' .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select other_details from paragraphs where paragraph_text like 'korea'", "external_knowledge": "None" }, { "question": "What are the details for the paragraph that includes the text 'Korea ' ?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the details for the paragraph that includes the text 'Korea ' ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select other_details from paragraphs where paragraph_text like 'korea'", "external_knowledge": "None" }, { "question": "Show all paragraph ids and texts for the document with name 'Welcome to NY'.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Welcome to NY', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Welcome to NY', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all paragraph ids and texts for the document with name 'Welcome to NY'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'", "external_knowledge": "None" }, { "question": "What are the ids and texts of paragraphs in the document titled 'Welcome to NY'?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Welcome to NY', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Welcome to NY', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids and texts of paragraphs in the document titled 'Welcome to NY'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'", "external_knowledge": "None" }, { "question": "Show all paragraph texts for the document \"Customer reviews\".", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Customer reviews', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Customer reviews', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all paragraph texts for the document \"Customer reviews\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = \"Customer reviews\"", "external_knowledge": "None" }, { "question": "What are the paragraph texts for the document with the name 'Customer reviews'?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Customer reviews', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Customer reviews', 'Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the paragraph texts for the document with the name 'Customer reviews'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = \"Customer reviews\"", "external_knowledge": "None" }, { "question": "Show all document ids and the number of paragraphs in each document. Order by document id.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all document ids and the number of paragraphs in each document. Order by document id.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", "external_knowledge": "None" }, { "question": "Return the different document ids along with the number of paragraphs corresponding to each, ordered by id.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the different document ids along with the number of paragraphs corresponding to each, ordered by id.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", "external_knowledge": "None" }, { "question": "Show all document ids, names and the number of paragraphs in each document.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all document ids, names and the number of paragraphs in each document.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.document_id , T2.document_name , count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id", "external_knowledge": "None" }, { "question": "What are the ids and names of each document, as well as the number of paragraphs in each?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids and names of each document, as well as the number of paragraphs in each?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.document_id , T2.document_name , count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id", "external_knowledge": "None" }, { "question": "List all document ids with at least two paragraphs.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList all document ids with at least two paragraphs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", "external_knowledge": "None" }, { "question": "What are the ids of documents that have 2 or more paragraphs?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids of documents that have 2 or more paragraphs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", "external_knowledge": "None" }, { "question": "What is the document id and name with greatest number of paragraphs?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the document id and name with greatest number of paragraphs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Return the id and name of the document with the most paragraphs.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the id and name of the document with the most paragraphs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the document id with least number of paragraphs?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the document id with least number of paragraphs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1", "external_knowledge": "None" }, { "question": "Return the id of the document with the fewest paragraphs.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the id of the document with the fewest paragraphs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the document id with 1 to 2 paragraphs?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the document id with 1 to 2 paragraphs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2", "external_knowledge": "None" }, { "question": "Give the ids of documents that have between one and two paragraphs.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the ids of documents that have between one and two paragraphs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2", "external_knowledge": "None" }, { "question": "Show the document id with paragraph text 'Brazil' and 'Ireland'.", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Ireland', 'Brazil', 'Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Ireland', 'Brazil', 'Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the document id with paragraph text 'Brazil' and 'Ireland'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'", "external_knowledge": "None" }, { "question": "What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'?", "schema": "CREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Ireland', 'Brazil', 'Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Template_Types (\n Template_Type_Code text, -- example: ['AD', 'BK']\n Template_Type_Description text, -- example: ['Presentation', 'CV']\n PRIMARY KEY (Template_Type_Code)\n);\n\nCREATE TABLE Templates (\n Template_ID number, -- example: [0, 1]\n Version_Number number, -- example: [5, 9]\n Template_Type_Code text, -- example: ['PP', 'BK']\n Date_Effective_From time, -- example: ['2005-11-12 07:09:48', '2010-09-24 01:15:11']\n Date_Effective_To time, -- example: ['2008-01-05 14:19:28', '1999-07-08 03:31:04']\n Template_Details text,\n PRIMARY KEY (Template_ID),\n CONSTRAINT fk_templates_template_type_code FOREIGN KEY (Template_Type_Code) REFERENCES Ref_Template_Types (Template_Type_Code)\n);\n\nCREATE TABLE Documents (\n Document_ID number, -- example: [0, 1]\n Template_ID number, -- example: [7, 25]\n Document_Name text, -- example: ['Introduction of OS', 'Understanding DB']\n Document_Description text, -- example: ['n', 'y']\n Other_Details text,\n PRIMARY KEY (Document_ID),\n CONSTRAINT fk_documents_template_id FOREIGN KEY (Template_ID) REFERENCES Templates (Template_ID)\n);\n\nCREATE TABLE Paragraphs (\n Paragraph_ID number, -- example: [7, 9]\n Document_ID number, -- example: [2394, 3]\n Paragraph_Text text, -- example: ['Ireland', 'Brazil', 'Korea', 'Somalia']\n Other_Details text,\n PRIMARY KEY (Paragraph_ID),\n CONSTRAINT fk_paragraphs_document_id FOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'", "external_knowledge": "None" }, { "question": "How many teachers are there?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many teachers are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM teacher", "external_knowledge": "None" }, { "question": "What is the total count of teachers?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the total count of teachers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM teacher", "external_knowledge": "None" }, { "question": "List the names of teachers in ascending order of age.", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the names of teachers in ascending order of age.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM teacher ORDER BY Age ASC", "external_knowledge": "None" }, { "question": "What are the names of the teachers ordered by ascending age?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the teachers ordered by ascending age?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM teacher ORDER BY Age ASC", "external_knowledge": "None" }, { "question": "What are the age and hometown of teachers?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the age and hometown of teachers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Age , Hometown FROM teacher", "external_knowledge": "None" }, { "question": "What is the age and hometown of every teacher?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the age and hometown of every teacher?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Age , Hometown FROM teacher", "external_knowledge": "None" }, { "question": "List the name of teachers whose hometown is not `` Little Lever Urban District '' .", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Little Lever Urban District', 'Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Little Lever Urban District', 'Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the name of teachers whose hometown is not `` Little Lever Urban District '' .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select name from teacher where hometown != \"little lever urban district\"", "external_knowledge": "None" }, { "question": "What are the names of the teachers whose hometown is not `` Little Lever Urban District '' ?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Little Lever Urban District', 'Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Little Lever Urban District', 'Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the teachers whose hometown is not `` Little Lever Urban District '' ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select name from teacher where hometown != \"little lever urban district\"", "external_knowledge": "None" }, { "question": "Show the name of teachers aged either 32 or 33?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the name of teachers aged either 32 or 33?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM teacher WHERE Age = 32 OR Age = 33", "external_knowledge": "None" }, { "question": "What are the names of the teachers who are aged either 32 or 33?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the teachers who are aged either 32 or 33?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM teacher WHERE Age = 32 OR Age = 33", "external_knowledge": "None" }, { "question": "What is the hometown of the youngest teacher?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the hometown of the youngest teacher?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1", "external_knowledge": "None" }, { "question": "Where is the youngest teacher from?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhere is the youngest teacher from?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1", "external_knowledge": "None" }, { "question": "Show different hometown of teachers and the number of teachers from each hometown.", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow different hometown of teachers and the number of teachers from each hometown.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown", "external_knowledge": "None" }, { "question": "For each hometown, how many teachers are there?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor each hometown, how many teachers are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown", "external_knowledge": "None" }, { "question": "List the most common hometown of teachers.", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the most common hometown of teachers.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the most commmon hometowns for teachers?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the most commmon hometowns for teachers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Show the hometowns shared by at least two teachers.", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the hometowns shared by at least two teachers.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2", "external_knowledge": "None" }, { "question": "What are the towns from which at least two teachers come from?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the towns from which at least two teachers come from?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2", "external_knowledge": "None" }, { "question": "Show names of teachers and the courses they are arranged to teach.", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow names of teachers and the courses they are arranged to teach.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID", "external_knowledge": "None" }, { "question": "What is the name of each teacher and what course they teach?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of each teacher and what course they teach?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID", "external_knowledge": "None" }, { "question": "Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name.", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name", "external_knowledge": "None" }, { "question": "What are the names of the teachers and the courses they teach in ascending alphabetical order by the name of the teacher?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the teachers and the courses they teach in ascending alphabetical order by the name of the teacher?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name", "external_knowledge": "None" }, { "question": "Show the name of the teacher for the math course.", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Math', 'Language Arts']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Math', 'Language Arts']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the name of the teacher for the math course.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = \"Math\"", "external_knowledge": "None" }, { "question": "What are the names of the people who teach math courses?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Math', 'Language Arts']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Math', 'Language Arts']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the people who teach math courses?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = \"Math\"", "external_knowledge": "None" }, { "question": "Show names of teachers and the number of courses they teach.", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow names of teachers and the number of courses they teach.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name", "external_knowledge": "None" }, { "question": "What are the names of the teachers and how many courses do they teach?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the teachers and how many courses do they teach?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name", "external_knowledge": "None" }, { "question": "Show names of teachers that teach at least two courses.", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow names of teachers that teach at least two courses.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2", "external_knowledge": "None" }, { "question": "What are the names of the teachers who teach at least two courses?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the teachers who teach at least two courses?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2", "external_knowledge": "None" }, { "question": "List the names of teachers who have not been arranged to teach courses.", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the names of teachers who have not been arranged to teach courses.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)", "external_knowledge": "None" }, { "question": "What are the names of the teachers whose courses have not been arranged?", "schema": "CREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE course (\n Course_ID number, -- example: [1, 2]\n Staring_Date text, -- example: ['5 May', '6 May']\n Course text, -- example: ['Language Arts', 'Math']\n PRIMARY KEY (Course_ID)\n);\n\nCREATE TABLE teacher (\n Teacher_ID number, -- example: [1, 2]\n Name text, -- example: ['Joseph Huts', 'Gustaaf Deloor']\n Age text, -- example: ['32', '29']\n Hometown text, -- example: ['Blackrod Urban District', 'Bolton County Borough']\n PRIMARY KEY (Teacher_ID)\n);\n\nCREATE TABLE course_arrange (\n Course_ID number, -- example: [2, 3]\n Teacher_ID number, -- example: [5, 3]\n Grade number, -- example: [1, 3]\n PRIMARY KEY (Course_ID),\n CONSTRAINT fk_course_arrange_course_id FOREIGN KEY (Course_ID) REFERENCES course (Course_ID),\n CONSTRAINT fk_course_arrange_teacher_id FOREIGN KEY (Teacher_ID) REFERENCES teacher (Teacher_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the teachers whose courses have not been arranged?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)", "external_knowledge": "None" }, { "question": "How many visitors below age 30 are there?", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many visitors below age 30 are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM visitor WHERE age < 30", "external_knowledge": "None" }, { "question": "Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low.", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM visitor WHERE Level_of_membership > 4 ORDER BY Level_of_membership DESC", "external_knowledge": "None" }, { "question": "What is the average age of the visitors whose membership level is not higher than 4?", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average age of the visitors whose membership level is not higher than 4?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(age) FROM visitor WHERE Level_of_membership <= 4", "external_knowledge": "None" }, { "question": "Find the name and membership level of the visitors whose membership level is higher than 4, and sort by their age from old to young.", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the name and membership level of the visitors whose membership level is higher than 4, and sort by their age from old to young.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC", "external_knowledge": "None" }, { "question": "Find the id and name of the museum that has the most staff members?", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the id and name of the museum that has the most staff members?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT museum_id , name FROM museum ORDER BY num_of_staff DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the average number of staff working for the museums that were open before 2009.", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the average number of staff working for the museums that were open before 2009.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(num_of_staff) FROM museum WHERE open_year < 2009", "external_knowledge": "None" }, { "question": "What are the opening year and staff number of the museum named Plaza Museum?", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the opening year and staff number of the museum named Plaza Museum?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Num_of_Staff , Open_Year FROM museum WHERE name = 'Plaza Museum'", "external_knowledge": "None" }, { "question": "find the names of museums which have more staff than the minimum staff number of all museums opened after 2010.", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nfind the names of museums which have more staff than the minimum staff number of all museums opened after 2010.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM museum WHERE num_of_staff > (SELECT min(num_of_staff) FROM museum WHERE open_year > 2010)", "external_knowledge": "None" }, { "question": "find the id, name and age for visitors who visited some museums more than once.", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nfind the id, name and age for visitors who visited some museums more than once.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT t1.id , t1.name , t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t1.id HAVING count(*) > 1", "external_knowledge": "None" }, { "question": "What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT t2.visitor_id , t1.name , t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY sum(t2.Total_spent) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What are the id and name of the museum visited most times?", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the id and name of the museum visited most times?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT t2.Museum_ID , t1.name FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID GROUP BY t2.Museum_ID ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the name of the museum that had no visitor yet?", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the museum that had no visitor yet?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM museum WHERE Museum_ID NOT IN (SELECT museum_id FROM visit)", "external_knowledge": "None" }, { "question": "Find the name and age of the visitor who bought the most tickets at once.", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the name and age of the visitor who bought the most tickets at once.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT t1.name , t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id ORDER BY t2.num_of_ticket DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What are the average and maximum number of tickets bought in all visits?", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the average and maximum number of tickets bought in all visits?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(num_of_ticket) , max(num_of_ticket) FROM visit", "external_knowledge": "None" }, { "question": "What is the total ticket expense of the visitors whose membership level is 1?", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the total ticket expense of the visitors whose membership level is 1?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(t2.Total_spent) FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id WHERE t1.Level_of_membership = 1", "external_knowledge": "None" }, { "question": "What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011?", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year < 2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year > 2011", "external_knowledge": "None" }, { "question": "Find the number of visitors who did not visit any museum opened after 2010.", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of visitors who did not visit any museum opened after 2010.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM visitor WHERE id NOT IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010)", "external_knowledge": "None" }, { "question": "How many museums were opened after 2013 or before 2008?", "schema": "CREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE museum (\n Museum_ID number, -- example: [1, 2]\n Name text, -- example: ['Plaza Museum', 'Capital Plaza Museum']\n Num_of_Staff number, -- example: [62, 25]\n Open_Year text, -- example: ['2000', '2012']\n PRIMARY KEY (Museum_ID)\n);\n\nCREATE TABLE visitor (\n ID number, -- customer id, example: [1, 2]\n Name text, -- example: ['Gonzalo Higuaín ', 'Guti Midfielder']\n Level_of_membership number, -- example: [8, 5]\n Age number, -- example: [35, 28]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE visit (\n Museum_ID number, -- example: [1, 2]\n visitor_ID text, -- customer id, example: ['5', '3']\n Num_of_Ticket number, -- example: [20, 4]\n Total_spent number, -- example: [320.14, 89.98]\n PRIMARY KEY (Museum_ID),\n CONSTRAINT fk_visit_museum_id FOREIGN KEY (Museum_ID) REFERENCES museum (Museum_ID),\n CONSTRAINT fk_visit_visitor_id FOREIGN KEY (visitor_ID) REFERENCES visitor (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many museums were opened after 2013 or before 2008?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM museum WHERE open_year > 2013 OR open_year < 2008", "external_knowledge": "None" }, { "question": "Find the total number of players.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the total number of players.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM players", "external_knowledge": "None" }, { "question": "How many players are there?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many players are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM players", "external_knowledge": "None" }, { "question": "Find the total number of matches.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the total number of matches.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM matches", "external_knowledge": "None" }, { "question": "Count the number of matches.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of matches.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM matches", "external_knowledge": "None" }, { "question": "List the first name and birth date of all players from the country with code USA.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['USA', 'SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['USA', 'POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['USA', 'SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['USA', 'POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the first name and birth date of all players from the country with code USA.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , birth_date FROM players WHERE country_code = 'USA'", "external_knowledge": "None" }, { "question": "What are the first names and birth dates of players from the USA?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['USA', 'SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['USA', 'POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['USA', 'SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['USA', 'POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the first names and birth dates of players from the USA?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , birth_date FROM players WHERE country_code = 'USA'", "external_knowledge": "None" }, { "question": "Find the average age of losers and winners of all matches.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the average age of losers and winners of all matches.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(loser_age) , avg(winner_age) FROM matches", "external_knowledge": "None" }, { "question": "What are the average ages of losers and winners across matches?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the average ages of losers and winners across matches?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(loser_age) , avg(winner_age) FROM matches", "external_knowledge": "None" }, { "question": "Find the average rank of winners in all matches.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the average rank of winners in all matches.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(winner_rank) FROM matches", "external_knowledge": "None" }, { "question": "What is the average rank for winners in all matches?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average rank for winners in all matches?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(winner_rank) FROM matches", "external_knowledge": "None" }, { "question": "Find the highest rank of losers in all matches.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the highest rank of losers in all matches.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT min(loser_rank) FROM matches", "external_knowledge": "None" }, { "question": "What is the best rank of losers across all matches?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the best rank of losers across all matches?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT min(loser_rank) FROM matches", "external_knowledge": "None" }, { "question": "find the number of distinct country codes of all players.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nfind the number of distinct country codes of all players.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT country_code) FROM players", "external_knowledge": "None" }, { "question": "How many distinct countries do players come from?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many distinct countries do players come from?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT country_code) FROM players", "external_knowledge": "None" }, { "question": "Find the number of distinct name of losers.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of distinct name of losers.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT loser_name) FROM matches", "external_knowledge": "None" }, { "question": "How many different loser names are there?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many different loser names are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT loser_name) FROM matches", "external_knowledge": "None" }, { "question": "Find the name of tourney that has more than 10 matches.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Ha', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Ha', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the name of tourney that has more than 10 matches.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10", "external_knowledge": "None" }, { "question": "What are the names of tournaments that have more than 10 matches?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of tournaments that have more than 10 matches?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10", "external_knowledge": "None" }, { "question": "List the names of all winners who played in both 2013 and 2016.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the names of all winners who played in both 2013 and 2016.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016", "external_knowledge": "None" }, { "question": "What are the names of players who won in both 2013 and 2016?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Cho Won', 'Martina', 'Mirjana']\n last_name text, -- example: ['Won', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Cho Won', 'Martina', 'Mirjana']\n last_name text, -- example: ['Won', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of players who won in both 2013 and 2016?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016", "external_knowledge": "None" }, { "question": "List the number of all matches who played in years of 2013 or 2016.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the number of all matches who played in years of 2013 or 2016.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016", "external_knowledge": "None" }, { "question": "How many matches were played in 2013 or 2016?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many matches were played in 2013 or 2016?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016", "external_knowledge": "None" }, { "question": "What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Cho Won', 'Martina', 'Mirjana']\n last_name text, -- example: ['Won', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Australian Open', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Cho Won', 'Martina', 'Mirjana']\n last_name text, -- example: ['Won', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Australian Open', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the country code and first name of the players who won in both tourney WTA Championships and Australian Open?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'", "external_knowledge": "None" }, { "question": "What are the first names and country codes for players who won both the WTA Championships and the Australian Open?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Cho Won', 'Martina', 'Mirjana']\n last_name text, -- example: ['Won', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Australian Open', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Cho Won', 'Martina', 'Mirjana']\n last_name text, -- example: ['Won', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Australian Open', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the first names and country codes for players who won both the WTA Championships and the Australian Open?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'", "external_knowledge": "None" }, { "question": "Find the first name and country code of the oldest player.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the first name and country code of the oldest player.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1", "external_knowledge": "None" }, { "question": "What is the first name and country code of the oldest player?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the first name and country code of the oldest player?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1", "external_knowledge": "None" }, { "question": "List the first and last name of all players in the order of birth date.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Last', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Last', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the first and last name of all players in the order of birth date.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , last_name FROM players ORDER BY birth_date", "external_knowledge": "None" }, { "question": "What are the full names of all players, sorted by birth date?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the full names of all players, sorted by birth date?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , last_name FROM players ORDER BY birth_date", "external_knowledge": "None" }, { "question": "List the first and last name of all players who are left / L hand in the order of birth date.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['L', 'Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Last', 'Hingis', 'Lucic']\n hand text, -- example: ['L', 'R']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['L', 'R']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['L', 'R']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['L', 'Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Last', 'Hingis', 'Lucic']\n hand text, -- example: ['L', 'R']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['L', 'R']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['L', 'R']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the first and last name of all players who are left / L hand in the order of birth date.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date", "external_knowledge": "None" }, { "question": "What are the full names of all left handed players, in order of birth date?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Hande', 'Martina', 'Mirjana']\n last_name text, -- example: ['Hande', 'Date', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Hande', 'Martina', 'Mirjana']\n last_name text, -- example: ['Hande', 'Date', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the full names of all left handed players, in order of birth date?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date", "external_knowledge": "None" }, { "question": "Find the first name and country code of the player who did the most number of tours.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Tour', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Tour', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the first name and country code of the player who did the most number of tours.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the first name and country code of the player with the most tours?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Tour', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Tour', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the first name and country code of the player with the most tours?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the year that has the most number of matches.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Ha', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Ha', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the year that has the most number of matches.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which year had the most matches?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich year had the most matches?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the name and rank points of the winner who won the most times.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Cho Won', 'Martina', 'Mirjana']\n last_name text, -- example: ['Won', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Cho Won', 'Martina', 'Mirjana']\n last_name text, -- example: ['Won', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the name and rank points of the winner who won the most times.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the name of the winner who has won the most matches, and how many rank points does this player have?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Won', 'Ha', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Won', 'Ha', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the winner who has won the most matches, and how many rank points does this player have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Ha', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['Australian Open', 'WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Ha', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['Australian Open', 'WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the name of the winner who has the highest rank points and participated in the Australian Open tourney.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the name of the winner with the most rank points who participated in the Australian Open tournament?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['Australian Open', 'WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['Australian Open', 'WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the winner with the most rank points who participated in the Australian Open tournament?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1", "external_knowledge": "None" }, { "question": "find the names of loser and winner who played in the match with greatest number of minutes.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nfind the names of loser and winner who played in the match with greatest number of minutes.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What are the names of the winner and loser who played in the longest match?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the winner and loser who played in the longest match?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the average ranking for each player and their first name.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the average ranking for each player and their first name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(ranking) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "external_knowledge": "None" }, { "question": "What are the first names of all players, and their average rankings?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the first names of all players, and their average rankings?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(ranking) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "external_knowledge": "None" }, { "question": "Find the total ranking points for each player and their first name.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the total ranking points for each player and their first name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "external_knowledge": "None" }, { "question": "What are the first names of all players, and their total ranking points?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the first names of all players, and their total ranking points?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "external_knowledge": "None" }, { "question": "find the number of players for each country.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nfind the number of players for each country.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , country_code FROM players GROUP BY country_code", "external_knowledge": "None" }, { "question": "How many players are from each country?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many players are from each country?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , country_code FROM players GROUP BY country_code", "external_knowledge": "None" }, { "question": "find the code of the country where has the greatest number of players.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Ha', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Ha', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nfind the code of the country where has the greatest number of players.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the code of the country with the most players?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the code of the country with the most players?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the codes of countries that have more than 50 players.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the codes of countries that have more than 50 players.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50", "external_knowledge": "None" }, { "question": "What are the codes of countries with more than 50 players?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the codes of countries with more than 50 players?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50", "external_knowledge": "None" }, { "question": "Find the total number of tours for each ranking date.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Tour', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Tour', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the total number of tours for each ranking date.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date", "external_knowledge": "None" }, { "question": "How many total tours were there for each ranking date?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Tour', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Tour', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many total tours were there for each ranking date?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date", "external_knowledge": "None" }, { "question": "Find the number of matches happened in each year.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of matches happened in each year.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , YEAR FROM matches GROUP BY YEAR", "external_knowledge": "None" }, { "question": "How many matches were played in each year?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many matches were played in each year?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , YEAR FROM matches GROUP BY YEAR", "external_knowledge": "None" }, { "question": "Find the name and rank of the 3 youngest winners across all matches.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the name and rank of the 3 youngest winners across all matches.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3", "external_knowledge": "None" }, { "question": "What are the names and ranks of the three youngest winners across all matches?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names and ranks of the three youngest winners across all matches?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3", "external_knowledge": "None" }, { "question": "How many different winners both participated in the WTA Championships and were left handed?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Hande', 'Martina', 'Mirjana']\n last_name text, -- example: ['Hande', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Hande', 'Martina', 'Mirjana']\n last_name text, -- example: ['Hande', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many different winners both participated in the WTA Championships and were left handed?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'", "external_knowledge": "None" }, { "question": "Find the number of left handed winners who participated in the WTA Championships.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Hande', 'Martina', 'Mirjana']\n last_name text, -- example: ['Hande', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Hande', 'Martina', 'Mirjana']\n last_name text, -- example: ['Hande', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of left handed winners who participated in the WTA Championships.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'", "external_knowledge": "None" }, { "question": "Find the first name, country code and birth date of the winner who has the highest rank points in all matches.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Ha', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Ha', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the first name, country code and birth date of the winner who has the highest rank points in all matches.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the first name, country code, and birth date of the player with the most winner rank points across all matches?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Date', 'Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the first name, country code, and birth date of the player with the most winner rank points across all matches?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the number of players for each hand type.", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of players for each hand type.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , hand FROM players GROUP BY hand", "external_knowledge": "None" }, { "question": "How many players are there for each hand type?", "schema": "CREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE players (\n player_id number, -- example: [200001, 200002]\n first_name text, -- example: ['Martina', 'Mirjana']\n last_name text, -- example: ['Hingis', 'Lucic']\n hand text, -- example: ['R', 'L']\n birth_date time, -- example: [19800930, 19820309]\n country_code text, -- example: ['SUI', 'CRO']\n PRIMARY KEY (player_id)\n);\n\nCREATE TABLE matches (\n best_of number, -- example: [3]\n draw_size number, -- example: [4, 32]\n loser_age number, -- example: [24.626967830300003, 23.6221765914]\n loser_entry text,\n loser_hand text, -- example: ['R', 'L']\n loser_ht number, -- example: [170, 183]\n loser_id number, -- example: [201474, 201520]\n loser_ioc text, -- example: ['POL', 'CZE']\n loser_name text, -- example: ['Agnieszka Radwanska', 'Petra Kvitova']\n loser_rank number, -- example: [4, 6]\n loser_rank_points number, -- example: [5890, 4370]\n loser_seed number, -- example: [3, 5]\n match_num number, -- example: [297, 296]\n minutes number, -- example: [82, 72]\n round text, -- example: ['RR', 'SF']\n score text, -- example: ['6-2 6-4', '6-2 6-3']\n surface text, -- example: ['Hard', 'Clay']\n tourney_date time, -- example: [20131021, 20160104]\n tourney_id text, -- example: ['2013-W-WT-TUR-01A-2013', '2016-1049']\n tourney_level text, -- example: ['W', 'I']\n tourney_name text, -- example: ['WTA Championships', 'Auckland']\n winner_age number, -- example: [32.0684462697, 23.6221765914]\n winner_entry text,\n winner_hand text, -- example: ['R', 'L']\n winner_ht number, -- example: [175, 183]\n winner_id number, -- example: [200033, 201520]\n winner_ioc text, -- example: ['USA', 'CZE']\n winner_name text, -- example: ['Serena Williams', 'Petra Kvitova']\n winner_rank number, -- example: [1, 6]\n winner_rank_points number, -- example: [12040, 4370]\n winner_seed number, -- example: [1, 5]\n `year` number, -- example: [2013, 2016]\n CONSTRAINT fk_matches_loser_id FOREIGN KEY (loser_id) REFERENCES players (player_id),\n CONSTRAINT fk_matches_winner_id FOREIGN KEY (winner_id) REFERENCES players (player_id)\n);\n\nCREATE TABLE rankings (\n ranking_date time, -- example: [20000101, 20000103]\n ranking number, -- example: [3, 4]\n player_id number, -- example: [200748, 200033]\n ranking_points number, -- example: [4378, 3021]\n tours number, -- example: [13, 15]\n CONSTRAINT fk_rankings_player_id FOREIGN KEY (player_id) REFERENCES players (player_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many players are there for each hand type?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , hand FROM players GROUP BY hand", "external_knowledge": "None" }, { "question": "How many ships ended up being 'Captured'?", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many ships ended up being 'Captured'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM ship WHERE disposition_of_ship = 'Captured'", "external_knowledge": "None" }, { "question": "List the name and tonnage ordered by in descending alphaetical order for the names.", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the name and tonnage ordered by in descending alphaetical order for the names.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , tonnage FROM ship ORDER BY name DESC", "external_knowledge": "None" }, { "question": "List the name, date and result of each battle.", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the name, date and result of each battle.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , date FROM battle", "external_knowledge": "None" }, { "question": "What is maximum and minimum death toll caused each time?", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is maximum and minimum death toll caused each time?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(killed) , min(killed) FROM death", "external_knowledge": "None" }, { "question": "What is the average number of injuries caused each time?", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average number of injuries caused each time?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(injured) FROM death", "external_knowledge": "None" }, { "question": "What are the death and injury situations caused by the ship with tonnage 't'?", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the death and injury situations caused by the ship with tonnage 't'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.killed , T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id WHERE T2.tonnage = 't'", "external_knowledge": "None" }, { "question": "What are the name and results of the battles when the bulgarian commander is not 'Boril'", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Boril', 'Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Boril', 'Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the name and results of the battles when the bulgarian commander is not 'Boril'\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , RESULT FROM battle WHERE bulgarian_commander != 'Boril'", "external_knowledge": "None" }, { "question": "What are the different ids and names of the battles that lost any 'Brig' type shipes?", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the different ids and names of the battles that lost any 'Brig' type shipes?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig'", "external_knowledge": "None" }, { "question": "What are the ids and names of the battles that led to more than 10 people killed in total.", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids and names of the battles that led to more than 10 people killed in total.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id GROUP BY T1.id HAVING sum(T3.killed) > 10", "external_knowledge": "None" }, { "question": "What is the ship id and name that caused most total injuries?", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the ship id and name that caused most total injuries?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.id , T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'", "external_knowledge": "None" }, { "question": "How many different results are there for the battles?", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many different results are there for the battles?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT RESULT) FROM battle", "external_knowledge": "None" }, { "question": "How many battles did not lose any ship with tonnage '225'?", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many battles did not lose any ship with tonnage '225'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' );", "external_knowledge": "None" }, { "question": "List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['HMS Atalanta', 'Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['HMS Atalanta', 'Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta'", "external_knowledge": "None" }, { "question": "Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , RESULT , bulgarian_commander FROM battle EXCEPT SELECT T1.name , T1.result , T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'", "external_knowledge": "None" }, { "question": "What are the notes of the death events which has substring 'East'?", "schema": "CREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE battle (\n id number, -- example: [1, 2]\n name text, -- example: ['Battle of Adrianople', 'Battle of Serres']\n `date` text, -- example: ['14 April 1205', 'June 1205']\n bulgarian_commander text, -- example: ['Kaloyan', 'Unknown']\n latin_commander text, -- example: ['Baldwin I', 'Unknown']\n result text, -- example: ['Bulgarian victory', 'Latin victory']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE ship (\n lost_in_battle number, -- example: [8, 7]\n id number, -- example: [1, 2]\n name text, -- example: ['Lettice', 'Bon Accord']\n tonnage text, -- example: ['t', '391']\n ship_type text, -- example: ['Brig', '18-gun Brig']\n location text, -- example: ['English Channel', 'SW Approaches']\n disposition_of_ship text, -- example: ['Captured', 'Wrecked']\n PRIMARY KEY (id),\n CONSTRAINT fk_ship_lost_in_battle FOREIGN KEY (lost_in_battle) REFERENCES battle (id)\n);\n\nCREATE TABLE death (\n caused_by_ship_id number, -- example: [1, 2]\n id number, -- example: [1, 2]\n note text, -- example: ['Dantewada, Chhattisgarh', 'Erraboru, Chhattisgarh']\n killed number, -- example: [8, 3]\n injured number, -- example: [0, 9]\n PRIMARY KEY (id),\n CONSTRAINT fk_death_caused_by_ship_id FOREIGN KEY (caused_by_ship_id) REFERENCES ship (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the notes of the death events which has substring 'East'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT note FROM death WHERE note LIKE '%East%'", "external_knowledge": "None" }, { "question": "what are all the addresses including line 1 and line 2?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nwhat are all the addresses including line 1 and line 2?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT line_1 , line_2 FROM addresses", "external_knowledge": "None" }, { "question": "What is the first and second line for all addresses?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the first and second line for all addresses?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT line_1 , line_2 FROM addresses", "external_knowledge": "None" }, { "question": "How many courses in total are listed?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many courses in total are listed?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Courses", "external_knowledge": "None" }, { "question": "How many courses are there?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many courses are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Courses", "external_knowledge": "None" }, { "question": "How is the math course described?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['math', 'ds']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['math', 'computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['math', 'ds']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['math', 'computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow is the math course described?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT course_description FROM Courses WHERE course_name = 'math'", "external_knowledge": "None" }, { "question": "What are the descriptions for all the math courses?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['math', 'ds']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['math', 'computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['math', 'ds']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['math', 'computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the descriptions for all the math courses?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT course_description FROM Courses WHERE course_name = 'math'", "external_knowledge": "None" }, { "question": "What is the zip code of the address in the city Port Chelsea?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the zip code of the address in the city Port Chelsea?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'", "external_knowledge": "None" }, { "question": "What is the zip code for Port Chelsea?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the zip code for Port Chelsea?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'", "external_knowledge": "None" }, { "question": "Which department offers the most number of degrees? List department name and id.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich department offers the most number of degrees? List department name and id.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.department_name , T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the name and id of the department with the most number of degrees ?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name and id of the department with the most number of degrees ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select t2.department_name , t1.department_id from degree_programs as t1 join departments as t2 on t1.department_id = t2.department_id group by t1.department_id order by count(*) desc limit 1", "external_knowledge": "None" }, { "question": "How many departments offer any degree?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many departments offer any degree?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT department_id) FROM Degree_Programs", "external_knowledge": "None" }, { "question": "How many different departments offer degrees?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many different departments offer degrees?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT department_id) FROM Degree_Programs", "external_knowledge": "None" }, { "question": "How many different degree names are offered?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many different degree names are offered?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs", "external_knowledge": "None" }, { "question": "How many different degrees are offered?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many different degrees are offered?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs", "external_knowledge": "None" }, { "question": "How many degrees does the engineering department offer?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['engineer', 'computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['engineer', 'computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many degrees does the engineering department offer?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", "external_knowledge": "None" }, { "question": "How many degrees does the engineering department have?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['engineer', 'computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['engineer', 'computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many degrees does the engineering department have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", "external_knowledge": "None" }, { "question": "What are the names and descriptions of all the sections?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names and descriptions of all the sections?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT section_name , section_description FROM Sections", "external_knowledge": "None" }, { "question": "What are the names and descriptions for all the sections?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names and descriptions for all the sections?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT section_name , section_description FROM Sections", "external_knowledge": "None" }, { "question": "What are the names and id of courses having at most 2 sections?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names and id of courses having at most 2 sections?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2", "external_knowledge": "None" }, { "question": "What are the names and ids of every course with less than 2 sections?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names and ids of every course with less than 2 sections?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2", "external_knowledge": "None" }, { "question": "List the section_name in reversed lexicographical order.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the section_name in reversed lexicographical order.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT section_name FROM Sections ORDER BY section_name DESC", "external_knowledge": "None" }, { "question": "What are the names of the sections in reverse alphabetical order?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the sections in reverse alphabetical order?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT section_name FROM Sections ORDER BY section_name DESC", "external_knowledge": "None" }, { "question": "What is the semester which most student registered in? Show both the name and the id.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the semester which most student registered in? Show both the name and the id.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "For each semester, what is the name and id of the one with the most students registered?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor each semester, what is the name and id of the one with the most students registered?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the description of the department whose name has the substring the computer?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the description of the department whose name has the substring the computer?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'", "external_knowledge": "None" }, { "question": "What is the department description for the one whose name has the word computer?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the department description for the one whose name has the word computer?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'", "external_knowledge": "None" }, { "question": "Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWho are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2", "external_knowledge": "None" }, { "question": "What are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2", "external_knowledge": "None" }, { "question": "Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Bachelor', 'Master']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Bachelor', 'Master']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWho is enrolled in a Bachelor degree program? List the first name, middle name, last name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'", "external_knowledge": "None" }, { "question": "What are the first, middle, and last names for everybody enrolled in a Bachelors program?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Bachelor', 'Master']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Bachelor', 'Master']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the first, middle, and last names for everybody enrolled in a Bachelors program?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'", "external_knowledge": "None" }, { "question": "Find the kind of program which most number of students are enrolled in?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the kind of program which most number of students are enrolled in?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the degree summary name that has the most number of students enrolled?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the degree summary name that has the most number of students enrolled?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the program which most number of students are enrolled in. List both the id and the summary.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the program which most number of students are enrolled in. List both the id and the summary.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.degree_program_id , T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the program id and the summary of the degree that has the most students enrolled?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the program id and the summary of the degree that has the most students enrolled?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.degree_program_id , T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which student has enrolled for the most times in any program? List the id, first name, middle name, last name, the number of enrollments and student id.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich student has enrolled for the most times in any program? List the id, first name, middle name, last name, the number of enrollments and student id.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.student_id , T1.first_name , T1.middle_name , T1.last_name , count(*) , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the first, middle, and last name, along with the id and number of enrollments, for the student who enrolled the most in any program?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the first, middle, and last name, along with the id and number of enrollments, for the student who enrolled the most in any program?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.student_id , T1.first_name , T1.middle_name , T1.last_name , count(*) , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which semesters do not have any student enrolled? List the semester name.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich semesters do not have any student enrolled? List the semester name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", "external_knowledge": "None" }, { "question": "What is the name of the semester with no students enrolled?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the semester with no students enrolled?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", "external_knowledge": "None" }, { "question": "What are all the course names of the courses which ever have students enrolled in?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are all the course names of the courses which ever have students enrolled in?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id", "external_knowledge": "None" }, { "question": "What are the names of all courses that have some students enrolled?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of all courses that have some students enrolled?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id", "external_knowledge": "None" }, { "question": "What's the name of the course with most number of enrollments?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat's the name of the course with most number of enrollments?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the name of the course with the most students enrolled?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the course with the most students enrolled?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id", "external_knowledge": "None" }, { "question": "What are the last name of the students who live in North Carolina but have not registered in any degree programs?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the last name of the students who live in North Carolina but have not registered in any degree programs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id", "external_knowledge": "None" }, { "question": "Show the date and id of the transcript with at least 2 course results.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the date and id of the transcript with at least 2 course results.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2", "external_knowledge": "None" }, { "question": "What is the date and id of the transcript with at least 2 courses listed?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the date and id of the transcript with at least 2 courses listed?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2", "external_knowledge": "None" }, { "question": "What is the phone number of the man with the first name Timmothy and the last name Ward?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the phone number of the man with the first name Timmothy and the last name Ward?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'", "external_knowledge": "None" }, { "question": "What is the mobile phone number of the student named Timmothy Ward ?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the mobile phone number of the student named Timmothy Ward ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select cell_mobile_number from students where first_name = 'timmothy' and last_name = 'ward'", "external_knowledge": "None" }, { "question": "Who is the first student to register? List the first name, middle name and last name.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWho is the first student to register? List the first name, middle name and last name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the first, middle, and last name of the first student to register?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the first, middle, and last name of the first student to register?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1", "external_knowledge": "None" }, { "question": "Who is the earliest graduate of the school? List the first name, middle name and last name.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWho is the earliest graduate of the school? List the first name, middle name and last name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the first, middle, and last name of the earliest school graduate?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the first, middle, and last name of the earliest school graduate?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1", "external_knowledge": "None" }, { "question": "Whose permanent address is different from his or her current address? List his or her first name.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhose permanent address is different from his or her current address? List his or her first name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name FROM Students WHERE current_address_id != permanent_address_id", "external_knowledge": "None" }, { "question": "What is the first name of the student whose permanent address is different from his or her current one?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the first name of the student whose permanent address is different from his or her current one?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name FROM Students WHERE current_address_id != permanent_address_id", "external_knowledge": "None" }, { "question": "Which address holds the most number of students currently? List the address id and all lines.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich address holds the most number of students currently? List the address id and all lines.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.address_id , T1.line_1 , T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the id, line 1, and line 2 of the address with the most students?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the id, line 1, and line 2 of the address with the most students?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.address_id , T1.line_1 , T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "On average, when were the transcripts printed?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nOn average, when were the transcripts printed?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(transcript_date) FROM Transcripts", "external_knowledge": "None" }, { "question": "What is the average transcript date?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average transcript date?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(transcript_date) FROM Transcripts", "external_knowledge": "None" }, { "question": "When is the first transcript released? List the date and details.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhen is the first transcript released? List the date and details.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the earliest date of a transcript release, and what details can you tell me?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the earliest date of a transcript release, and what details can you tell me?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", "external_knowledge": "None" }, { "question": "How many transcripts are released?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many transcripts are released?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Transcripts", "external_knowledge": "None" }, { "question": "How many transcripts are listed?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many transcripts are listed?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Transcripts", "external_knowledge": "None" }, { "question": "What is the last transcript release date?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the last transcript release date?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1", "external_knowledge": "None" }, { "question": "When was the last transcript released?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhen was the last transcript released?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1", "external_knowledge": "None" }, { "question": "How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the maximum number of times that a course shows up in different transcripts and what is that course's enrollment id?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the maximum number of times that a course shows up in different transcripts and what is that course's enrollment id?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Show the date of the transcript which shows the least number of results, also list the id.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the date of the transcript which shows the least number of results, also list the id.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the date and id of the transcript with the least number of results?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the date and id of the transcript with the least number of results?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the semester when both Master students and Bachelor students got enrolled in.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Bachelor', 'Master']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Bachelor', 'Master']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the semester when both Master students and Bachelor students got enrolled in.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'", "external_knowledge": "None" }, { "question": "What is the id of the semester that had both Masters and Bachelors students enrolled?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Bachelor', 'Master']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Bachelor', 'Master']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the id of the semester that had both Masters and Bachelors students enrolled?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'", "external_knowledge": "None" }, { "question": "How many different addresses do the students currently live?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many different addresses do the students currently live?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT current_address_id) FROM Students", "external_knowledge": "None" }, { "question": "What are the different addresses that have students living there?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the different addresses that have students living there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT current_address_id) FROM Students", "external_knowledge": "None" }, { "question": "List all the student details in reversed lexicographical order.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList all the student details in reversed lexicographical order.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT other_student_details FROM Students ORDER BY other_student_details DESC", "external_knowledge": "None" }, { "question": "What other details can you tell me about students in reverse alphabetical order?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat other details can you tell me about students in reverse alphabetical order?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT other_student_details FROM Students ORDER BY other_student_details DESC", "external_knowledge": "None" }, { "question": "Describe the section h.", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['h', 'a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['h', 'a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nDescribe the section h.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT section_description FROM Sections WHERE section_name = 'h'", "external_knowledge": "None" }, { "question": "What is the description for the section named h?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['h', 'a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['h', 'a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the description for the section named h?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT section_description FROM Sections WHERE section_name = 'h'", "external_knowledge": "None" }, { "question": "Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582 .", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Haiti', 'Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Haiti', 'Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582 .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id = t2.address_id where t2.country = 'haiti' or t1.cell_mobile_number = '09700166582'", "external_knowledge": "None" }, { "question": "What are the first names of the students who live in Haiti permanently or have the cell phone number 09700166582 ?", "schema": "CREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Haiti', 'Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Addresses (\n address_id number, -- example: [1, 2]\n line_1 text, -- example: ['2294 Grant Square Apt. 235', '3999 Aufderhar Ways Suite 593']\n line_2 text, -- example: ['Apt. 370', 'Apt. 388']\n line_3 text,\n city text, -- example: ['Port Chelsea', 'Lake Laishafurt']\n zip_postcode text, -- example: ['148', '943']\n state_province_county text, -- example: ['Virginia', 'Kentucky']\n country text, -- example: ['Haiti', 'Iceland', 'Burundi']\n other_address_details text,\n PRIMARY KEY (address_id)\n);\n\nCREATE TABLE Courses (\n course_id number, -- example: [1, 2]\n course_name text, -- example: ['ds', 'math']\n course_description text, -- example: ['p', 'q']\n other_details text,\n PRIMARY KEY (course_id)\n);\n\nCREATE TABLE Departments (\n department_id number, -- example: [1, 2]\n department_name text, -- example: ['computer science', 'history']\n department_description text, -- example: ['error', 'nostrum']\n other_details text,\n PRIMARY KEY (department_id)\n);\n\nCREATE TABLE Degree_Programs (\n degree_program_id number, -- example: [1, 2]\n department_id number, -- example: [13, 2]\n degree_summary_name text, -- example: ['Master', 'Bachelor']\n degree_summary_description text, -- example: ['architecto', 'cumque']\n other_details text,\n PRIMARY KEY (degree_program_id),\n CONSTRAINT fk_degree_programs_department_id FOREIGN KEY (department_id) REFERENCES Departments (department_id)\n);\n\nCREATE TABLE Sections (\n section_id number, -- example: [1, 2]\n course_id number, -- example: [9, 2]\n section_name text, -- example: ['a', 'b']\n section_description text, -- example: ['non', 'voluptatem']\n other_details text,\n PRIMARY KEY (section_id),\n CONSTRAINT fk_sections_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id)\n);\n\nCREATE TABLE Semesters (\n semester_id number, -- example: [1, 2]\n semester_name text, -- example: ['spring 2010', 'summer 2010']\n semester_description text, -- example: ['x', 'g']\n other_details text,\n PRIMARY KEY (semester_id)\n);\n\nCREATE TABLE Students (\n student_id number, -- example: [1, 2]\n current_address_id number, -- example: [10, 12]\n permanent_address_id number, -- example: [15, 5]\n first_name text, -- example: ['Timmothy', 'Hobart']\n middle_name text, -- example: ['Anna', 'Lorenz']\n last_name text, -- example: ['Ward', 'Balistreri']\n cell_mobile_number text, -- example: ['(096)889-8954x524', '1-009-710-5151']\n email_address text, -- example: ['erwin.zboncak@example.com', 'swift.kolby@example.com']\n ssn text, -- example: ['965', '304246']\n date_first_registered time, -- example: ['1971-02-05 07:28:23', '1976-10-26 02:33:06']\n date_left time, -- example: ['1971-05-17 19:28:49', '2013-10-05 17:41:28']\n other_student_details text, -- example: ['quia', 'autem']\n PRIMARY KEY (student_id),\n CONSTRAINT fk_students_current_address_id FOREIGN KEY (current_address_id) REFERENCES Addresses (address_id),\n CONSTRAINT fk_students_permanent_address_id FOREIGN KEY (permanent_address_id) REFERENCES Addresses (address_id)\n);\n\nCREATE TABLE Student_Enrolment (\n student_enrolment_id number, -- example: [1, 2]\n degree_program_id number, -- example: [12, 4]\n semester_id number, -- example: [13, 2]\n student_id number, -- example: [14, 9]\n other_details text,\n PRIMARY KEY (student_enrolment_id),\n CONSTRAINT fk_student_enrolment_degree_program_id FOREIGN KEY (degree_program_id) REFERENCES Degree_Programs (degree_program_id),\n CONSTRAINT fk_student_enrolment_semester_id FOREIGN KEY (semester_id) REFERENCES Semesters (semester_id),\n CONSTRAINT fk_student_enrolment_student_id FOREIGN KEY (student_id) REFERENCES Students (student_id)\n);\n\nCREATE TABLE Student_Enrolment_Courses (\n student_course_id number, -- example: [0, 1]\n course_id number, -- example: [6, 14]\n student_enrolment_id number, -- example: [2, 8]\n PRIMARY KEY (student_course_id),\n CONSTRAINT fk_student_enrolment_courses_course_id FOREIGN KEY (course_id) REFERENCES Courses (course_id),\n CONSTRAINT fk_student_enrolment_courses_student_enrolment_id FOREIGN KEY (student_enrolment_id) REFERENCES Student_Enrolment (student_enrolment_id)\n);\n\nCREATE TABLE Transcripts (\n transcript_id number, -- example: [1, 2]\n transcript_date time, -- example: ['1988-04-30 01:19:47', '1975-10-28 15:16:51']\n other_details text,\n PRIMARY KEY (transcript_id)\n);\n\nCREATE TABLE Transcript_Contents (\n student_course_id number, -- example: [0, 96]\n transcript_id number, -- example: [2, 8]\n CONSTRAINT fk_transcript_contents_student_course_id FOREIGN KEY (student_course_id) REFERENCES Student_Enrolment_Courses (student_course_id),\n CONSTRAINT fk_transcript_contents_transcript_id FOREIGN KEY (transcript_id) REFERENCES Transcripts (transcript_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the first names of the students who live in Haiti permanently or have the cell phone number 09700166582 ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id = t2.address_id where t2.country = 'haiti' or t1.cell_mobile_number = '09700166582'", "external_knowledge": "None" }, { "question": "List the title of all cartoons in alphabetical order.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the title of all cartoons in alphabetical order.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Title FROM Cartoon ORDER BY title", "external_knowledge": "None" }, { "question": "What are the titles of the cartoons sorted alphabetically?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the titles of the cartoons sorted alphabetically?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Title FROM Cartoon ORDER BY title", "external_knowledge": "None" }, { "question": "List all cartoon directed by \"Ben Jones\".", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList all cartoon directed by \"Ben Jones\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\";", "external_knowledge": "None" }, { "question": "What are the names of all cartoons directed by Ben Jones?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of all cartoons directed by Ben Jones?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\";", "external_knowledge": "None" }, { "question": "How many cartoons were written by \"Joseph Kuhr\"?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Joseph Kuhr', 'Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Joseph Kuhr', 'Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many cartoons were written by \"Joseph Kuhr\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Cartoon WHERE Written_by = \"Joseph Kuhr\";", "external_knowledge": "None" }, { "question": "What is the number of cartoones written by Joseph Kuhr?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Joseph Kuhr', 'Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Joseph Kuhr', 'Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of cartoones written by Joseph Kuhr?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Cartoon WHERE Written_by = \"Joseph Kuhr\";", "external_knowledge": "None" }, { "question": "list all cartoon titles and their directors ordered by their air date", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nlist all cartoon titles and their directors ordered by their air date\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date", "external_knowledge": "None" }, { "question": "What is the name and directors of all the cartoons that are ordered by air date?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name and directors of all the cartoons that are ordered by air date?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date", "external_knowledge": "None" }, { "question": "List the title of all cartoon directed by \"Ben Jones\" or \"Brandon Vietti\".", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Brandon Vietti', 'Ben Jones']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Brandon Vietti', 'Ben Jones']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the title of all cartoon directed by \"Ben Jones\" or \"Brandon Vietti\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\";", "external_knowledge": "None" }, { "question": "What are the titles of all cartoons directed by Ben Jones or Brandon Vietti?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Brandon Vietti', 'Ben Jones']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Brandon Vietti', 'Ben Jones']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the titles of all cartoons directed by Ben Jones or Brandon Vietti?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\";", "external_knowledge": "None" }, { "question": "Which country has the most of TV Channels? List the country and number of TV Channels it has.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich country has the most of TV Channels? List the country and number of TV Channels it has.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;", "external_knowledge": "None" }, { "question": "What is the country with the most number of TV Channels and how many does it have?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the country with the most number of TV Channels and how many does it have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;", "external_knowledge": "None" }, { "question": "List the number of different series names and contents in the TV Channel table.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the number of different series names and contents in the TV Channel table.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;", "external_knowledge": "None" }, { "question": "How many different series and contents are listed in the TV Channel table?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many different series and contents are listed in the TV Channel table?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;", "external_knowledge": "None" }, { "question": "What is the content of TV Channel with serial name \"Sky Radio\"?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the content of TV Channel with serial name \"Sky Radio\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Content FROM TV_Channel WHERE series_name = \"Sky Radio\";", "external_knowledge": "None" }, { "question": "What is the content of the series Sky Radio?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the content of the series Sky Radio?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Content FROM TV_Channel WHERE series_name = \"Sky Radio\";", "external_knowledge": "None" }, { "question": "What is the Package Option of TV Channel with serial name \"Sky Radio\"?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Option', 'Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Option', 'Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the Package Option of TV Channel with serial name \"Sky Radio\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Package_Option FROM TV_Channel WHERE series_name = \"Sky Radio\";", "external_knowledge": "None" }, { "question": "What are the Package Options of the TV Channels whose series names are Sky Radio?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Option', 'Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Option', 'Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the Package Options of the TV Channels whose series names are Sky Radio?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Package_Option FROM TV_Channel WHERE series_name = \"Sky Radio\";", "external_knowledge": "None" }, { "question": "How many TV Channel using language English?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['English', 'Italian']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['English', 'Italian']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many TV Channel using language English?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM TV_Channel WHERE LANGUAGE = \"English\";", "external_knowledge": "None" }, { "question": "How many TV Channels use the English language?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['English', 'Italian']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['English', 'Italian']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many TV Channels use the English language?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM TV_Channel WHERE LANGUAGE = \"English\";", "external_knowledge": "None" }, { "question": "List the language used least number of TV Channel. List language and number of TV Channel.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the language used least number of TV Channel. List language and number of TV Channel.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;", "external_knowledge": "None" }, { "question": "What are the languages used by the least number of TV Channels and how many channels use it?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the languages used by the least number of TV Channels and how many channels use it?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;", "external_knowledge": "None" }, { "question": "List each language and the number of TV Channels using it.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList each language and the number of TV Channels using it.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE", "external_knowledge": "None" }, { "question": "For each language, list the number of TV Channels that use it.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor each language, list the number of TV Channels that use it.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE", "external_knowledge": "None" }, { "question": "What is the TV Channel that shows the cartoon \"The Rise of the Blue Beetle!\"? List the TV Channel's series name.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the TV Channel that shows the cartoon \"The Rise of the Blue Beetle!\"? List the TV Channel's series name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = \"The Rise of the Blue Beetle!\";", "external_knowledge": "None" }, { "question": "What is the series name of the TV Channel that shows the cartoon \"The Rise of the Blue Beetle\"?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the series name of the TV Channel that shows the cartoon \"The Rise of the Blue Beetle\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Title = \"The Rise of the Blue Beetle!\";", "external_knowledge": "None" }, { "question": "List the title of all Cartoons showed on TV Channel with series name \"Sky Radio\".", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the title of all Cartoons showed on TV Channel with series name \"Sky Radio\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", "external_knowledge": "None" }, { "question": "What is the title of all the cartools that are on the TV Channel with the series name \"Sky Radio\"?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the title of all the cartools that are on the TV Channel with the series name \"Sky Radio\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Title FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", "external_knowledge": "None" }, { "question": "List the Episode of all TV series sorted by rating.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the Episode of all TV series sorted by rating.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Episode FROM TV_series ORDER BY rating", "external_knowledge": "None" }, { "question": "What are all of the episodes ordered by ratings?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are all of the episodes ordered by ratings?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Episode FROM TV_series ORDER BY rating", "external_knowledge": "None" }, { "question": "List top 3 highest Rating TV series. List the TV series's Episode and Rating.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList top 3 highest Rating TV series. List the TV series's Episode and Rating.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;", "external_knowledge": "None" }, { "question": "What are 3 most highly rated episodes in the TV series table and what were those ratings?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are 3 most highly rated episodes in the TV series table and what were those ratings?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3;", "external_knowledge": "None" }, { "question": "What is minimum and maximum share of TV series?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is minimum and maximum share of TV series?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(SHARE) , min(SHARE) FROM TV_series;", "external_knowledge": "None" }, { "question": "What is the maximum and minimum share for the TV series?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the maximum and minimum share for the TV series?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(SHARE) , min(SHARE) FROM TV_series;", "external_knowledge": "None" }, { "question": "What is the air date of TV series with Episode \"A Love of a Lifetime\"?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the air date of TV series with Episode \"A Love of a Lifetime\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Air_Date FROM TV_series WHERE Episode = \"A Love of a Lifetime\";", "external_knowledge": "None" }, { "question": "When did the episode \"A Love of a Lifetime\" air?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhen did the episode \"A Love of a Lifetime\" air?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Air_Date FROM TV_series WHERE Episode = \"A Love of a Lifetime\";", "external_knowledge": "None" }, { "question": "What is Weekly Rank of TV series with Episode \"A Love of a Lifetime\"?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is Weekly Rank of TV series with Episode \"A Love of a Lifetime\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"A Love of a Lifetime\";", "external_knowledge": "None" }, { "question": "What is the weekly rank for the episode \"A Love of a Lifetime\"?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the weekly rank for the episode \"A Love of a Lifetime\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"A Love of a Lifetime\";", "external_knowledge": "None" }, { "question": "What is the TV Channel of TV series with Episode \"A Love of a Lifetime\"? List the TV Channel's series name.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the TV Channel of TV series with Episode \"A Love of a Lifetime\"? List the TV Channel's series name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = \"A Love of a Lifetime\";", "external_knowledge": "None" }, { "question": "What is the name of the series that has the episode \"A Love of a Lifetime\"?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the series that has the episode \"A Love of a Lifetime\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.series_name FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T2.Episode = \"A Love of a Lifetime\";", "external_knowledge": "None" }, { "question": "List the Episode of all TV series showed on TV Channel with series name \"Sky Radio\".", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the Episode of all TV series showed on TV Channel with series name \"Sky Radio\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", "external_knowledge": "None" }, { "question": "What is the episode for the TV series named \"Sky Radio\"?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the episode for the TV series named \"Sky Radio\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel WHERE T1.series_name = \"Sky Radio\";", "external_knowledge": "None" }, { "question": "Find the number of cartoons directed by each of the listed directors.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of cartoons directed by each of the listed directors.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by", "external_knowledge": "None" }, { "question": "How many cartoons did each director create?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many cartoons did each director create?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , Directed_by FROM cartoon GROUP BY Directed_by", "external_knowledge": "None" }, { "question": "Find the production code and channel of the most recently aired cartoon .", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the production code and channel of the most recently aired cartoon .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select production_code , channel from cartoon order by original_air_date desc limit 1", "external_knowledge": "None" }, { "question": "What is the produdction code and channel of the most recent cartoon ?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the produdction code and channel of the most recent cartoon ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select production_code , channel from cartoon order by original_air_date desc limit 1", "external_knowledge": "None" }, { "question": "Find the package choice and series name of the TV channel that has high definition TV.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the package choice and series name of the TV channel that has high definition TV.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT package_option , series_name FROM TV_Channel WHERE hight_definition_TV = \"yes\"", "external_knowledge": "None" }, { "question": "What are the package options and the name of the series for the TV Channel that supports high definition TV?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Option', 'Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Option', 'Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the package options and the name of the series for the TV Channel that supports high definition TV?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT package_option , series_name FROM TV_Channel WHERE hight_definition_TV = \"yes\"", "external_knowledge": "None" }, { "question": "which countries' tv channels are playing some cartoon written by Todd Casey?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Todd Casey', 'Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Todd Casey', 'Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nwhich countries' tv channels are playing some cartoon written by Todd Casey?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "external_knowledge": "None" }, { "question": "What are the countries that have cartoons on TV that were written by Todd Casey?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Todd Casey', 'Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Todd Casey', 'Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the countries that have cartoons on TV that were written by Todd Casey?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "external_knowledge": "None" }, { "question": "which countries' tv channels are not playing any cartoon written by Todd Casey?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Todd Casey', 'Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Todd Casey', 'Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nwhich countries' tv channels are not playing any cartoon written by Todd Casey?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "external_knowledge": "None" }, { "question": "What are the countries that are not playing cartoons written by Todd Casey?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Todd Casey', 'Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Todd Casey', 'Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the countries that are not playing cartoons written by Todd Casey?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "external_knowledge": "None" }, { "question": "Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Michael Chang', 'Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Michael Chang', 'Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'", "external_knowledge": "None" }, { "question": "What is the series name and country of all TV channels that are playing cartoons directed by Ben Jones and cartoons directed by Michael Chang?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Michael Chang', 'Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Michael Chang', 'Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the series name and country of all TV channels that are playing cartoons directed by Ben Jones and cartoons directed by Michael Chang?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'", "external_knowledge": "None" }, { "question": "find the pixel aspect ratio and nation of the tv channels that do not use English.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['English', 'Italian']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['English', 'Italian']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nfind the pixel aspect ratio and nation of the tv channels that do not use English.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'", "external_knowledge": "None" }, { "question": "What is the pixel aspect ratio and country of origin for all TV channels that do not use English?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['English', 'Italian']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['English', 'Italian']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the pixel aspect ratio and country of origin for all TV channels that do not use English?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'", "external_knowledge": "None" }, { "question": "find id of the tv channels that from the countries where have more than two tv channels.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nfind id of the tv channels that from the countries where have more than two tv channels.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2", "external_knowledge": "None" }, { "question": "What are the ids of all tv channels that have more than 2 TV channels?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids of all tv channels that have more than 2 TV channels?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2", "external_knowledge": "None" }, { "question": "find the id of tv channels that do not play any cartoon directed by Ben Jones.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nfind the id of tv channels that do not play any cartoon directed by Ben Jones.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'", "external_knowledge": "None" }, { "question": "What are the ids of the TV channels that do not have any cartoons directed by Ben Jones?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids of the TV channels that do not have any cartoons directed by Ben Jones?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'", "external_knowledge": "None" }, { "question": "find the package option of the tv channel that do not have any cartoon directed by Ben Jones.", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Option', 'Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Option', 'Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nfind the package option of the tv channel that do not have any cartoon directed by Ben Jones.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')", "external_knowledge": "None" }, { "question": "What are the package options of all tv channels that are not playing any cartoons directed by Ben Jones?", "schema": "CREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Option', 'Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE TV_Channel (\n id text, -- example: ['700', '701']\n series_name text, -- example: ['Sky Radio', 'Sky Music']\n Country text, -- example: ['Italy', 'United Kingdom']\n `Language` text, -- example: ['Italian', 'English']\n Content text, -- example: ['music']\n Pixel_aspect_ratio_PAR text, -- example: ['4:3', '4:3 / 16:9']\n Hight_definition_TV text, -- example: ['no', 'yes']\n Pay_per_view_PPV text, -- example: ['no']\n Package_Option text, -- example: ['Option', 'Sky Famiglia', 'no ( FTV )']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE TV_series (\n id number, -- example: [1.0, 2.0]\n Episode text, -- example: ['A Love of a Lifetime', 'Friendly Skies']\n Air_Date text, -- example: ['September 24, 2007', 'October 1, 2007']\n Rating text, -- example: ['5.8', '5.3']\n Share number, -- example: [9.0, 7.0]\n 18_49_Rating_Share text, -- example: ['3.5/9', '3.2/8']\n Viewers_m text, -- example: ['9.16', '8.23']\n Weekly_Rank number, -- example: [43.0, 50.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_tv_series_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\n\nCREATE TABLE Cartoon (\n id number, -- example: [1.0, 2.0]\n Title text, -- example: ['The Rise of the Blue Beetle!', 'Terror on Dinosaur Island!']\n Directed_by text, -- example: ['Ben Jones', 'Brandon Vietti']\n Written_by text, -- example: ['Michael Jelenic', 'Steven Melching']\n Original_air_date text, -- example: ['November14,2008', 'November21,2008']\n Production_code number, -- example: [101.0, 102.0]\n Channel text, -- example: ['700', '701']\n PRIMARY KEY (id),\n CONSTRAINT fk_cartoon_channel FOREIGN KEY (Channel) REFERENCES TV_Channel (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the package options of all tv channels that are not playing any cartoons directed by Ben Jones?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')", "external_knowledge": "None" }, { "question": "How many poker players are there?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many poker players are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM poker_player", "external_knowledge": "None" }, { "question": "Count the number of poker players.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of poker players.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM poker_player", "external_knowledge": "None" }, { "question": "List the earnings of poker players in descending order.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the earnings of poker players in descending order.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Earnings FROM poker_player ORDER BY Earnings DESC", "external_knowledge": "None" }, { "question": "What are the earnings of poker players, ordered descending by value?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the earnings of poker players, ordered descending by value?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Earnings FROM poker_player ORDER BY Earnings DESC", "external_knowledge": "None" }, { "question": "List the final tables made and the best finishes of poker players.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the final tables made and the best finishes of poker players.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Final_Table_Made , Best_Finish FROM poker_player", "external_knowledge": "None" }, { "question": "What are the final tables made and best finishes for all poker players?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the final tables made and best finishes for all poker players?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Final_Table_Made , Best_Finish FROM poker_player", "external_knowledge": "None" }, { "question": "What is the average earnings of poker players?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average earnings of poker players?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(Earnings) FROM poker_player", "external_knowledge": "None" }, { "question": "Return the average earnings across all poker players.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the average earnings across all poker players.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(Earnings) FROM poker_player", "external_knowledge": "None" }, { "question": "What is the money rank of the poker player with the highest earnings?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the money rank of the poker player with the highest earnings?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Return the money rank of the player with the greatest earnings.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the money rank of the player with the greatest earnings.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the maximum number of final tables made among poker players with earnings less than 200000?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the maximum number of final tables made among poker players with earnings less than 200000?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000", "external_knowledge": "None" }, { "question": "Return the maximum final tables made across all poker players who have earnings below 200000.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the maximum final tables made across all poker players who have earnings below 200000.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(Final_Table_Made) FROM poker_player WHERE Earnings < 200000", "external_knowledge": "None" }, { "question": "What are the names of poker players?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of poker players?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", "external_knowledge": "None" }, { "question": "Return the names of all the poker players.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the names of all the poker players.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", "external_knowledge": "None" }, { "question": "What are the names of poker players whose earnings is higher than 300000?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of poker players whose earnings is higher than 300000?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000", "external_knowledge": "None" }, { "question": "Give the names of poker players who have earnings above 300000.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the names of poker players who have earnings above 300000.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000", "external_knowledge": "None" }, { "question": "List the names of poker players ordered by the final tables made in ascending order.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the names of poker players ordered by the final tables made in ascending order.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made", "external_knowledge": "None" }, { "question": "What are the names of poker players, ordered ascending by the number of final tables they have made?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of poker players, ordered ascending by the number of final tables they have made?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Final_Table_Made", "external_knowledge": "None" }, { "question": "What is the birth date of the poker player with the lowest earnings?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the birth date of the poker player with the lowest earnings?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1", "external_knowledge": "None" }, { "question": "Return the birth date of the poker player with the lowest earnings.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the birth date of the poker player with the lowest earnings.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the money rank of the tallest poker player?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the money rank of the tallest poker player?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Return the money rank of the poker player with the greatest height.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the money rank of the poker player with the greatest height.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the average earnings of poker players with height higher than 200?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average earnings of poker players with height higher than 200?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200", "external_knowledge": "None" }, { "question": "Give average earnings of poker players who are taller than 200.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive average earnings of poker players who are taller than 200.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200", "external_knowledge": "None" }, { "question": "What are the names of poker players in descending order of earnings?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of poker players in descending order of earnings?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC", "external_knowledge": "None" }, { "question": "Return the names of poker players sorted by their earnings descending.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the names of poker players sorted by their earnings descending.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC", "external_knowledge": "None" }, { "question": "What are different nationalities of people and the corresponding number of people from each nation?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are different nationalities of people and the corresponding number of people from each nation?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality", "external_knowledge": "None" }, { "question": "How many people are there of each nationality?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many people are there of each nationality?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality", "external_knowledge": "None" }, { "question": "What is the most common nationality of people?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the most common nationality of people?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Give the nationality that is most common across all people.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the nationality that is most common across all people.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What are the nationalities that are shared by at least two people?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the nationalities that are shared by at least two people?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2", "external_knowledge": "None" }, { "question": "Return the nationalities for which there are two or more people.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the nationalities for which there are two or more people.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2", "external_knowledge": "None" }, { "question": "List the names and birth dates of people in ascending alphabetical order of name.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the names and birth dates of people in ascending alphabetical order of name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name , Birth_Date FROM people ORDER BY Name ASC", "external_knowledge": "None" }, { "question": "What are the names and birth dates of people, ordered by their names in alphabetical order?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names and birth dates of people, ordered by their names in alphabetical order?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name , Birth_Date FROM people ORDER BY Name ASC", "external_knowledge": "None" }, { "question": "Show names of people whose nationality is not \"Russia\".", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow names of people whose nationality is not \"Russia\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM people WHERE Nationality != \"Russia\"", "external_knowledge": "None" }, { "question": "What are the names of people who are not from Russia?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of people who are not from Russia?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM people WHERE Nationality != \"Russia\"", "external_knowledge": "None" }, { "question": "List the names of people that are not poker players.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the names of people that are not poker players.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)", "external_knowledge": "None" }, { "question": "What are the names of people who do not play poker?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of people who do not play poker?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM poker_player)", "external_knowledge": "None" }, { "question": "How many distinct nationalities are there?", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many distinct nationalities are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT Nationality) FROM people", "external_knowledge": "None" }, { "question": "Count the number of different nationalities.", "schema": "CREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE poker_player (\n Poker_Player_ID number, -- example: [1, 2]\n People_ID number, -- example: [1, 2]\n Final_Table_Made number, -- example: [42.0, 10.0]\n Best_Finish number, -- example: [1.0, 2.0]\n Money_Rank number, -- example: [68.0, 141.0]\n Earnings number, -- example: [476090.0, 189233.0]\n PRIMARY KEY (Poker_Player_ID),\n CONSTRAINT fk_poker_player_people_id FOREIGN KEY (People_ID) REFERENCES people (People_ID)\n);\n\nCREATE TABLE people (\n People_ID number, -- example: [1, 2]\n Nationality text, -- example: ['Russia', 'Bulgaria']\n Name text, -- example: ['Aleksey Ostapenko', 'Teodor Salparov']\n Birth_Date text, -- example: ['May 26, 1986', 'August 16, 1982']\n Height number, -- example: [207.0, 182.0]\n PRIMARY KEY (People_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of different nationalities.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT Nationality) FROM people", "external_knowledge": "None" }, { "question": "How many states are there?", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many states are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM area_code_state", "external_knowledge": "None" }, { "question": "List the contestant numbers and names, ordered by contestant name descending.", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the contestant numbers and names, ordered by contestant name descending.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT contestant_number , contestant_name FROM contestants ORDER BY contestant_name DESC", "external_knowledge": "None" }, { "question": "List the vote ids, phone numbers and states of all votes.", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['ID', 'NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['ID', 'NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the vote ids, phone numbers and states of all votes.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT vote_id , phone_number , state FROM votes", "external_knowledge": "None" }, { "question": "What are the maximum and minimum values of area codes?", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the maximum and minimum values of area codes?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(area_code) , min(area_code) FROM area_code_state", "external_knowledge": "None" }, { "question": "What is last date created of votes from the state 'CA'?", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['CA', 'NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['CA', 'NY']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['CA', 'NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['CA', 'NY']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is last date created of votes from the state 'CA'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(created) FROM votes WHERE state = 'CA'", "external_knowledge": "None" }, { "question": "What are the names of the contestants whose names are not 'Jessie Alloway'", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Jessie Alloway', 'Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Jessie Alloway', 'Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the contestants whose names are not 'Jessie Alloway'\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway'", "external_knowledge": "None" }, { "question": "What are the distinct states and create time of all votes?", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the distinct states and create time of all votes?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT state , created FROM votes", "external_knowledge": "None" }, { "question": "What are the contestant numbers and names of the contestants who had at least two votes?", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the contestant numbers and names of the contestants who had at least two votes?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING count(*) >= 2", "external_knowledge": "None" }, { "question": "Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nOf all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number ORDER BY count(*) ASC LIMIT 1", "external_knowledge": "None" }, { "question": "What are the number of votes from state 'NY' or 'CA'?", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['CA', 'NY', 'NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['CA', 'NY']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['CA', 'NY', 'NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['CA', 'NY']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the number of votes from state 'NY' or 'CA'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM votes WHERE state = 'NY' OR state = 'CA'", "external_knowledge": "None" }, { "question": "How many contestants did not get voted?", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many contestants did not get voted?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )", "external_knowledge": "None" }, { "question": "What is the area code in which the most voters voted?", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the area code in which the most voters voted?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling'?", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Tabatha Gehling', 'Edwina Burnam']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Tabatha Gehling', 'Edwina Burnam']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the create dates, states, and phone numbers of the votes that were for the contestant named 'Tabatha Gehling'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.created , T2.state , T2.phone_number FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number WHERE T1.contestant_name = 'Tabatha Gehling'", "external_knowledge": "None" }, { "question": "List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'.", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Tabatha Gehling', 'Kelly Clauss', 'Edwina Burnam']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Tabatha Gehling', 'Kelly Clauss', 'Edwina Burnam']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Tabatha Gehling' INTERSECT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Kelly Clauss'", "external_knowledge": "None" }, { "question": "Return the names of the contestants whose names contain the substring 'Al' .", "schema": "CREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['AL', 'NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE AREA_CODE_STATE (\n area_code number, -- example: [201, 202]\n state text, -- example: ['AL', 'NJ', 'DC']\n PRIMARY KEY (area_code)\n);\n\nCREATE TABLE CONTESTANTS (\n contestant_number number, -- example: [1, 2]\n contestant_name text, -- example: ['Edwina Burnam', 'Tabatha Gehling']\n PRIMARY KEY (contestant_number)\n);\n\nCREATE TABLE VOTES (\n vote_id number, -- example: [5, 3]\n phone_number number, -- example: [5112677315, 6209222712]\n state text, -- example: ['NY', 'CA']\n contestant_number number, -- example: [2, 3]\n created time, -- example: ['2018-03-09 19:03:21', '2018-03-09 19:03:36']\n PRIMARY KEY (vote_id),\n CONSTRAINT fk_votes_state FOREIGN KEY (state) REFERENCES AREA_CODE_STATE (state),\n CONSTRAINT fk_votes_contestant_number FOREIGN KEY (contestant_number) REFERENCES CONTESTANTS (contestant_number)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the names of the contestants whose names contain the substring 'Al' .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select contestant_name from contestants where contestant_name like \"%al%\"", "external_knowledge": "None" }, { "question": "What are the names of all the countries that became independent after 1950?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of all the countries that became independent after 1950?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country WHERE IndepYear > 1950", "external_knowledge": "None" }, { "question": "Give the names of the nations that were founded after 1950.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the names of the nations that were founded after 1950.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country WHERE IndepYear > 1950", "external_knowledge": "None" }, { "question": "How many countries have a republic as their form of government?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many countries have a republic as their form of government?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"", "external_knowledge": "None" }, { "question": "How many countries have governments that are republics?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many countries have governments that are republics?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"", "external_knowledge": "None" }, { "question": "What is the total surface area of the countries in the Caribbean region?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Caribbean', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Caribbean', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the total surface area of the countries in the Caribbean region?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"", "external_knowledge": "None" }, { "question": "How much surface area do the countires in the Carribean cover together?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow much surface area do the countires in the Carribean cover together?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"", "external_knowledge": "None" }, { "question": "Which continent is Anguilla in?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Anguilla', 'Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Anguilla', 'Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Anguilla', 'Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Anguilla', 'Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich continent is Anguilla in?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Continent FROM country WHERE Name = \"Anguilla\"", "external_knowledge": "None" }, { "question": "What is the continent name which Anguilla belongs to?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Anguilla', 'Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Anguilla', 'Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Anguilla', 'Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Anguilla', 'Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the continent name which Anguilla belongs to?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Continent FROM country WHERE Name = \"Anguilla\"", "external_knowledge": "None" }, { "question": "Which region is the city Kabul located in?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich region is the city Kabul located in?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", "external_knowledge": "None" }, { "question": "What region is Kabul in?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat region is Kabul in?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", "external_knowledge": "None" }, { "question": "Which language is the most popular in Aruba?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich language is the most popular in Aruba?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\" ORDER BY Percentage DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What language is predominantly spoken in Aruba?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat language is predominantly spoken in Aruba?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\" ORDER BY Percentage DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What are the population and life expectancies in Brazil?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Brazil', 'Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Brazil', 'Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the population and life expectancies in Brazil?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"", "external_knowledge": "None" }, { "question": "Give me Brazil’s population and life expectancies.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Brazil', 'Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Brazil', 'Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive me Brazil’s population and life expectancies.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"", "external_knowledge": "None" }, { "question": "What are the region and population of Angola?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Angola', 'Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Angola', 'Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Angola', 'Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Angola', 'Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the region and population of Angola?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Population , Region FROM country WHERE Name = \"Angola\"", "external_knowledge": "None" }, { "question": "What region does Angola belong to and what is its population?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Angola', 'Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Angola', 'Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Angola', 'Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Angola', 'Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat region does Angola belong to and what is its population?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Population , Region FROM country WHERE Name = \"Angola\"", "external_knowledge": "None" }, { "question": "What is the average expected life expectancy for countries in the region of Central Africa?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Central', 'Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Central Africa', 'Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Central', 'Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Central Africa', 'Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average expected life expectancy for countries in the region of Central Africa?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"", "external_knowledge": "None" }, { "question": "How long is the people’s average life expectancy in Central Africa?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Central', 'Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Central Africa', 'Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Central', 'Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Central Africa', 'Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow long is the people’s average life expectancy in Central Africa?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"", "external_knowledge": "None" }, { "question": "What is the name of country that has the shortest life expectancy in Asia?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Ha', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Ha', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of country that has the shortest life expectancy in Asia?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1", "external_knowledge": "None" }, { "question": "Give the name of the country in Asia with the lowest life expectancy.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the name of the country in Asia with the lowest life expectancy.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1", "external_knowledge": "None" }, { "question": "What is the total population and maximum GNP in Asia?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the total population and maximum GNP in Asia?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"", "external_knowledge": "None" }, { "question": "How many people live in Asia, and what is the largest GNP among them?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many people live in Asia, and what is the largest GNP among them?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"", "external_knowledge": "None" }, { "question": "What is the average life expectancy in African countries that are republics?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average life expectancy in African countries that are republics?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", "external_knowledge": "None" }, { "question": "Give the average life expectancy for countries in Africa which are republics?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the average life expectancy for countries in Africa which are republics?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", "external_knowledge": "None" }, { "question": "What is the total surface area of the continents Asia and Europe?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the total surface area of the continents Asia and Europe?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", "external_knowledge": "None" }, { "question": "Give the total surface area covered by countries in Asia or Europe.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the total surface area covered by countries in Asia or Europe.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", "external_knowledge": "None" }, { "question": "How many people live in Gelderland district?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Gelderland', 'Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Gelderland', 'Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many people live in Gelderland district?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"", "external_knowledge": "None" }, { "question": "What is the total population of Gelderland district?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Gelderland', 'Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Gelderland', 'Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the total population of Gelderland district?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"", "external_knowledge": "None" }, { "question": "What is the average GNP and total population in all nations whose government is US territory?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['US Territory', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['US Territory', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average GNP and total population in all nations whose government is US territory?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"", "external_knowledge": "None" }, { "question": "Give the mean GNP and total population of nations which are considered US territory.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['US Territory', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['US Territory', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the mean GNP and total population of nations which are considered US territory.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"", "external_knowledge": "None" }, { "question": "How many unique languages are spoken in the world?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many unique languages are spoken in the world?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT LANGUAGE) FROM countrylanguage", "external_knowledge": "None" }, { "question": "What is the number of distinct languages used around the world?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of distinct languages used around the world?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT LANGUAGE) FROM countrylanguage", "external_knowledge": "None" }, { "question": "How many type of governments are in Africa?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many type of governments are in Africa?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"", "external_knowledge": "None" }, { "question": "How many different forms of governments are there in Africa?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many different forms of governments are there in Africa?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"", "external_knowledge": "None" }, { "question": "What is the total number of languages used in Aruba?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the total number of languages used in Aruba?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", "external_knowledge": "None" }, { "question": "How many languages are spoken in Aruba?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many languages are spoken in Aruba?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", "external_knowledge": "None" }, { "question": "How many official languages does Afghanistan have?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Afghanistan', 'Aruba']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Afghanistan', 'Aruba']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many official languages does Afghanistan have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", "external_knowledge": "None" }, { "question": "How many official languages are spoken in Afghanistan?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Afghanistan', 'Aruba']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Afghanistan', 'Aruba']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many official languages are spoken in Afghanistan?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", "external_knowledge": "None" }, { "question": "What is name of the country that speaks the largest number of languages?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is name of the country that speaks the largest number of languages?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Give the name of the nation that uses the greatest amount of languages.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the name of the nation that uses the greatest amount of languages.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which continent has the most diverse languages?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Ha', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Ha', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich continent has the most diverse languages?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which continent speaks the most languages?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich continent speaks the most languages?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "How many countries speak both English and Dutch?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many countries speak both English and Dutch?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\")", "external_knowledge": "None" }, { "question": "What is the number of nations that use English and Dutch?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of nations that use English and Dutch?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\")", "external_knowledge": "None" }, { "question": "What are the names of nations speak both English and French?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'French', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'French', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of nations speak both English and French?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"", "external_knowledge": "None" }, { "question": "Give the names of nations that speak both English and French.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'French', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'French', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the names of nations that speak both English and French.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"", "external_knowledge": "None" }, { "question": "What are the names of nations where both English and French are official languages?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'French', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'French', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of nations where both English and French are official languages?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\" AND T2.IsOfficial = \"T\"", "external_knowledge": "None" }, { "question": "Give the names of countries with English and French as official languages.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'French', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'French', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the names of countries with English and French as official languages.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\" AND T2.IsOfficial = \"T\"", "external_knowledge": "None" }, { "question": "What is the number of distinct continents where Chinese is spoken?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Chinese', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Chinese', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the number of distinct continents where Chinese is spoken?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", "external_knowledge": "None" }, { "question": "How many continents speak Chinese?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Chinese', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Chinese', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many continents speak Chinese?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", "external_knowledge": "None" }, { "question": "What are the regions that use English or Dutch?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the regions that use English or Dutch?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" OR T2.Language = \"Dutch\"", "external_knowledge": "None" }, { "question": "Which regions speak Dutch or English?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich regions speak Dutch or English?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" OR T2.Language = \"Dutch\"", "external_knowledge": "None" }, { "question": "What are the countries where either English or Dutch is the official language ?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the countries where either English or Dutch is the official language ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = \"english\" and isofficial = \"t\" union select t1.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode where t2.language = \"dutch\" and isofficial = \"t\"", "external_knowledge": "None" }, { "question": "Which countries have either English or Dutch as an official language?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich countries have either English or Dutch as an official language?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND IsOfficial = \"T\" UNION SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\" AND IsOfficial = \"T\"", "external_knowledge": "None" }, { "question": "Which language is the most popular on the Asian continent?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich language is the most popular on the Asian continent?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the language that is used by the largest number of Asian nations?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the language that is used by the largest number of Asian nations?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which languages are spoken by only one country in republic governments?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich languages are spoken by only one country in republic governments?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = \"Republic\" GROUP BY T2.Language HAVING COUNT(*) = 1", "external_knowledge": "None" }, { "question": "What languages are only used by a single country with a republic government?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat languages are only used by a single country with a republic government?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = \"Republic\" GROUP BY T2.Language HAVING COUNT(*) = 1", "external_knowledge": "None" }, { "question": "Find the city with the largest population that uses English.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the city with the largest population that uses English.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = \"English\" ORDER BY T1.Population DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the most populace city that speaks English?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the most populace city that speaks English?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = \"English\" ORDER BY T1.Population DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the name, population and expected life length of asian country with the largest area?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the name, population and expected life length of asian country with the largest area?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What are the name, population, and life expectancy of the largest Asian country by land?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the name, population, and life expectancy of the largest Asian country by land?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is average life expectancy in the countries where English is not the official language?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is average life expectancy in the countries where English is not the official language?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\")", "external_knowledge": "None" }, { "question": "Give the mean life expectancy of countries in which English is not the official language.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the mean life expectancy of countries in which English is not the official language.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\")", "external_knowledge": "None" }, { "question": "What is the total number of people living in the nations that do not use English?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the total number of people living in the nations that do not use English?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\")", "external_knowledge": "None" }, { "question": "How many people live in countries that do not speak English?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many people live in countries that do not speak English?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\")", "external_knowledge": "None" }, { "question": "What is the official language spoken in the country whose head of state is Beatrix?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the official language spoken in the country whose head of state is Beatrix?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\" AND T2.IsOfficial = \"T\"", "external_knowledge": "None" }, { "question": "What is the official language used in the country the name of whose head of state is Beatrix.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the official language used in the country the name of whose head of state is Beatrix.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\" AND T2.IsOfficial = \"T\"", "external_knowledge": "None" }, { "question": "What is the total number of unique official languages spoken in the countries that are founded before 1930?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the total number of unique official languages spoken in the countries that are founded before 1930?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = \"T\"", "external_knowledge": "None" }, { "question": "For the countries founded before 1930, what is the total number of distinct official languages?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor the countries founded before 1930, what is the total number of distinct official languages?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = \"T\"", "external_knowledge": "None" }, { "question": "What are the countries that have greater surface area than any country in Europe?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the countries that have greater surface area than any country in Europe?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")", "external_knowledge": "None" }, { "question": "Which countries have greater area than that of any country in Europe?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich countries have greater area than that of any country in Europe?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")", "external_knowledge": "None" }, { "question": "What are the African countries that have a population less than any country in Asia?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the African countries that have a population less than any country in Asia?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT max(population) FROM country WHERE Continent = \"Asia\")", "external_knowledge": "None" }, { "question": "Which African countries have a smaller population than that of any country in Asia?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich African countries have a smaller population than that of any country in Asia?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT min(population) FROM country WHERE Continent = \"Asia\")", "external_knowledge": "None" }, { "question": "Which Asian countries have a population that is larger than any country in Africa?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich Asian countries have a population that is larger than any country in Africa?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT max(population) FROM country WHERE Continent = \"Africa\")", "external_knowledge": "None" }, { "question": "What are the Asian countries which have a population larger than that of any country in Africa?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Africa', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the Asian countries which have a population larger than that of any country in Africa?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT min(population) FROM country WHERE Continent = \"Africa\")", "external_knowledge": "None" }, { "question": "What are the country codes for countries that do not speak English?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the country codes for countries that do not speak English?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "external_knowledge": "None" }, { "question": "Return the country codes for countries that do not speak English.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the country codes for countries that do not speak English.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "external_knowledge": "None" }, { "question": "What are the country codes of countries where people use languages other than English?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['US', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the country codes of countries where people use languages other than English?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != \"English\"", "external_knowledge": "None" }, { "question": "Give the country codes for countries in which people speak langauges that are not English.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the country codes for countries in which people speak langauges that are not English.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != \"English\"", "external_knowledge": "None" }, { "question": "What are the codes of the countries that do not speak English and whose government forms are not Republic?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the codes of the countries that do not speak English and whose government forms are not Republic?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Code FROM country WHERE GovernmentForm != \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "external_knowledge": "None" }, { "question": "Return the codes of countries that do not speak English and do not have Republics for governments.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Republic', 'Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['DO', 'AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the codes of countries that do not speak English and do not have Republics for governments.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Code FROM country WHERE GovernmentForm != \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "external_knowledge": "None" }, { "question": "Which cities are in European countries where English is not the official language?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich cities are in European countries where English is not the official language?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')", "external_knowledge": "None" }, { "question": "What are the names of cities in Europe for which English is not the official language?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['English', 'Dutch']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of cities in Europe for which English is not the official language?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')", "external_knowledge": "None" }, { "question": "Which unique cities are in Asian countries where Chinese is the official language ?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Chinese', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Chinese', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich unique cities are in Asian countries where Chinese is the official language ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select distinct t3.name from country as t1 join countrylanguage as t2 on t1.code = t2.countrycode join city as t3 on t1.code = t3.countrycode where t2.isofficial = 't' and t2.language = 'chinese' and t1.continent = \"asia\"", "external_knowledge": "None" }, { "question": "Return the different names of cities that are in Asia and for which Chinese is the official language.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Chinese', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Chinese', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the different names of cities that are in Asia and for which Chinese is the official language.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode JOIN city AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = \"Asia\"", "external_knowledge": "None" }, { "question": "What are the name, independence year, and surface area of the country with the smallest population?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Independence', 'Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Independence', 'Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the name, independence year, and surface area of the country with the smallest population?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1", "external_knowledge": "None" }, { "question": "Give the name, year of independence, and surface area of the country that has the lowest population.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Independence', 'Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Ha', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Independence', 'Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Ha', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the name, year of independence, and surface area of the country that has the lowest population.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name , SurfaceArea , IndepYear FROM country ORDER BY Population LIMIT 1", "external_knowledge": "None" }, { "question": "What are the population, name and leader of the country with the largest area?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the population, name and leader of the country with the largest area?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Give the name, population, and head of state for the country that has the largest area.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Ha', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Ha', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the name, population, and head of state for the country that has the largest area.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Return the country name and the numbers of languages spoken for each country that speaks at least 3 languages.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the country name and the numbers of languages spoken for each country that speaks at least 3 languages.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(T2.Language) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2", "external_knowledge": "None" }, { "question": "What are the names of countries that speak more than 2 languages, as well as how many languages they speak?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of countries that speak more than 2 languages, as well as how many languages they speak?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(T2.Language) , T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name HAVING COUNT(*) > 2", "external_knowledge": "None" }, { "question": "Find the number of cities in each district whose population is greater than the average population of cities?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of cities in each district whose population is greater than the average population of cities?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District", "external_knowledge": "None" }, { "question": "How many cities in each district have a population that is above the average population across all cities?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many cities in each district have a population that is above the average population across all cities?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District", "external_knowledge": "None" }, { "question": "Find the government form name and total population for each government form whose average life expectancy is longer than 72.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the government form name and total population for each government form whose average life expectancy is longer than 72.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72", "external_knowledge": "None" }, { "question": "What are the different government forms and what is the total population of each for government forms that have an average life expectancy greater than 72?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the different government forms and what is the total population of each for government forms that have an average life expectancy greater than 72?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(Population) , GovernmentForm FROM country GROUP BY GovernmentForm HAVING avg(LifeExpectancy) > 72", "external_knowledge": "None" }, { "question": "Find the average life expectancy and total population for each continent where the average life expectancy is shorter than 72?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the average life expectancy and total population for each continent where the average life expectancy is shorter than 72?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72", "external_knowledge": "None" }, { "question": "What are the different continents and the total popuation and average life expectancy corresponding to each, for continents that have an average life expectancy less than 72?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the different continents and the total popuation and average life expectancy corresponding to each, for continents that have an average life expectancy less than 72?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT sum(Population) , avg(LifeExpectancy) , Continent FROM country GROUP BY Continent HAVING avg(LifeExpectancy) < 72", "external_knowledge": "None" }, { "question": "What are the names and areas of countries with the top 5 largest area?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names and areas of countries with the top 5 largest area?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5", "external_knowledge": "None" }, { "question": "Return the names and surface areas of the 5 largest countries.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the names and surface areas of the 5 largest countries.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5", "external_knowledge": "None" }, { "question": "What are names of countries with the top 3 largest population?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are names of countries with the top 3 largest population?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3", "external_knowledge": "None" }, { "question": "Return the names of the 3 most populated countries.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the names of the 3 most populated countries.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3", "external_knowledge": "None" }, { "question": "What are the names of the nations with the 3 lowest populations?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the nations with the 3 lowest populations?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country ORDER BY Population ASC LIMIT 3", "external_knowledge": "None" }, { "question": "Return the names of the 3 countries with the fewest people.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the names of the 3 countries with the fewest people.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country ORDER BY Population ASC LIMIT 3", "external_knowledge": "None" }, { "question": "how many countries are in Asia?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nhow many countries are in Asia?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM country WHERE continent = \"Asia\"", "external_knowledge": "None" }, { "question": "Count the number of countries in Asia.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Asia', 'North America']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of countries in Asia.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM country WHERE continent = \"Asia\"", "external_knowledge": "None" }, { "question": "What are the names of the countries that are in the continent of Europe and have a population of 80000?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the countries that are in the continent of Europe and have a population of 80000?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"", "external_knowledge": "None" }, { "question": "Give the names of countries that are in Europe and have a population equal to 80000.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['Europe', 'North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the names of countries that are in Europe and have a population equal to 80000.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"", "external_knowledge": "None" }, { "question": "What is the total population and average area of countries in the continent of North America whose area is bigger than 3000 ?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['North America', 'Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['North America', 'Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the total population and average area of countries in the continent of North America whose area is bigger than 3000 ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select sum(population) , avg(surfacearea) from country where continent = \"north america\" and surfacearea > 3000", "external_knowledge": "None" }, { "question": "Give the total population and average surface area corresponding to countries in North America that have a surface area greater than 3000 .", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['North America', 'Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['North America', 'Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the total population and average surface area corresponding to countries in North America that have a surface area greater than 3000 .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select sum(population) , avg(surfacearea) from country where continent = \"north america\" and surfacearea > 3000", "external_knowledge": "None" }, { "question": "What are the cities whose population is between 160000 and 900000?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the cities whose population is between 160000 and 900000?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM city WHERE Population BETWEEN 160000 AND 900000", "external_knowledge": "None" }, { "question": "Return the names of cities that have a population between 160000 and 900000 .", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the names of cities that have a population between 160000 and 900000 .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select name from city where population between 160000 and 900000", "external_knowledge": "None" }, { "question": "Which language is spoken by the largest number of countries?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich language is spoken by the largest number of countries?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Give the language that is spoken in the most countries.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the language that is spoken in the most countries.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the language spoken by the largest percentage of people in each country?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the language spoken by the largest percentage of people in each country?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT LANGUAGE , CountryCode , max(Percentage) FROM countrylanguage GROUP BY CountryCode", "external_knowledge": "None" }, { "question": "What are the country codes of the different countries, and what are the languages spoken by the greatest percentage of people for each?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the country codes of the different countries, and what are the languages spoken by the greatest percentage of people for each?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT LANGUAGE , CountryCode , max(Percentage) FROM countrylanguage GROUP BY CountryCode", "external_knowledge": "None" }, { "question": "What is the total number of countries where Spanish is spoken by the largest percentage of people?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Spanish', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Spanish', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the total number of countries where Spanish is spoken by the largest percentage of people?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "external_knowledge": "None" }, { "question": "Count the number of countries for which Spanish is the predominantly spoken language.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Spanish', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Spanish', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of countries for which Spanish is the predominantly spoken language.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "external_knowledge": "None" }, { "question": "What are the codes of countries where Spanish is spoken by the largest percentage of people?", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Spanish', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Spanish', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the codes of countries where Spanish is spoken by the largest percentage of people?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT CountryCode , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "external_knowledge": "None" }, { "question": "Return the codes of countries for which Spanish is the predominantly spoken language.", "schema": "CREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Spanish', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE city (\n ID number, -- example: [129, 1]\n Name text, -- example: ['Kabul', 'Qandahar']\n CountryCode text, -- example: ['ABW', 'AFG']\n District text, -- example: ['Kabol', 'Qandahar']\n Population number, -- example: [1780000, 237500]\n PRIMARY KEY (ID),\n CONSTRAINT fk_city_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\n\nCREATE TABLE sqlite_sequence (\n name text, -- example: ['city']\n seq text, -- example: [4079]\n);\n\nCREATE TABLE country (\n Code text, -- example: ['ABW', 'AFG']\n Name text, -- example: ['Aruba', 'Afghanistan']\n Continent text, -- example: ['North America', 'Asia']\n Region text, -- example: ['Caribbean', 'Southern and Central Asia']\n SurfaceArea number, -- example: [193.0, 652090.0]\n IndepYear number, -- indepdent year, example: [1919, 1975]\n Population number, -- example: [103000, 22720000]\n LifeExpectancy number, -- example: [78.4, 45.9]\n GNP number, -- example: [828.0, 5976.0]\n GNPOld number, -- example: [793.0, 7984.0]\n LocalName text, -- example: ['Aruba', 'Afganistan/Afqanestan']\n GovernmentForm text, -- example: ['Nonmetropolitan Territory of The Netherl', 'Islamic Emirate']\n HeadOfState text, -- example: ['Beatrix', 'Mohammad Omar']\n Capital number, -- example: [129, 1]\n Code2 text, -- example: ['AW', 'AF']\n PRIMARY KEY (Code)\n);\n\nCREATE TABLE countrylanguage (\n CountryCode text, -- example: ['ABW', 'AFG']\n `Language` text, -- example: ['Spanish', 'Dutch', 'English']\n IsOfficial text, -- example: ['T', 'F']\n Percentage number, -- example: [5.3, 9.5]\n PRIMARY KEY (CountryCode),\n CONSTRAINT fk_countrylanguage_countrycode FOREIGN KEY (CountryCode) REFERENCES country (Code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the codes of countries for which Spanish is the predominantly spoken language.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT CountryCode , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "external_knowledge": "None" }, { "question": "How many conductors are there?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many conductors are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM conductor", "external_knowledge": "None" }, { "question": "Count the number of conductors.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of conductors.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM conductor", "external_knowledge": "None" }, { "question": "List the names of conductors in ascending order of age.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the names of conductors in ascending order of age.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM conductor ORDER BY Age ASC", "external_knowledge": "None" }, { "question": "What are the names of conductors, ordered by age?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of conductors, ordered by age?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM conductor ORDER BY Age ASC", "external_knowledge": "None" }, { "question": "What are the names of conductors whose nationalities are not \"USA\"?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of conductors whose nationalities are not \"USA\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM conductor WHERE Nationality != 'USA'", "external_knowledge": "None" }, { "question": "Return the names of conductors that do not have the nationality \"USA\".", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the names of conductors that do not have the nationality \"USA\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM conductor WHERE Nationality != 'USA'", "external_knowledge": "None" }, { "question": "What are the record companies of orchestras in descending order of years in which they were founded?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the record companies of orchestras in descending order of years in which they were founded?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC", "external_knowledge": "None" }, { "question": "Return the record companies of orchestras, sorted descending by the years in which they were founded.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the record companies of orchestras, sorted descending by the years in which they were founded.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Record_Company FROM orchestra ORDER BY Year_of_Founded DESC", "external_knowledge": "None" }, { "question": "What is the average attendance of shows?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average attendance of shows?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(Attendance) FROM SHOW", "external_knowledge": "None" }, { "question": "Return the average attendance across all shows.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the average attendance across all shows.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(Attendance) FROM SHOW", "external_knowledge": "None" }, { "question": "What are the maximum and minimum share of performances whose type is not \"Live final\".", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Live final', 'Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Live final', 'Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the maximum and minimum share of performances whose type is not \"Live final\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != \"Live final\"", "external_knowledge": "None" }, { "question": "Return the maximum and minimum shares for performances that do not have the type \"Live final\".", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Live final', 'Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Live final', 'Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the maximum and minimum shares for performances that do not have the type \"Live final\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != \"Live final\"", "external_knowledge": "None" }, { "question": "How many different nationalities do conductors have?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many different nationalities do conductors have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT Nationality) FROM conductor", "external_knowledge": "None" }, { "question": "Count the number of different nationalities of conductors.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of different nationalities of conductors.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT Nationality) FROM conductor", "external_knowledge": "None" }, { "question": "List names of conductors in descending order of years of work.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList names of conductors in descending order of years of work.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC", "external_knowledge": "None" }, { "question": "What are the names of conductors, sorted descending by the number of years they have worked?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of conductors, sorted descending by the number of years they have worked?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC", "external_knowledge": "None" }, { "question": "List the name of the conductor with the most years of work.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the name of the conductor with the most years of work.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the name of the conductor who has worked the greatest number of years?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the conductor who has worked the greatest number of years?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Show the names of conductors and the orchestras they have conducted.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the names of conductors and the orchestras they have conducted.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", "external_knowledge": "None" }, { "question": "What are the names of conductors as well as the corresonding orchestras that they have conducted?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of conductors as well as the corresonding orchestras that they have conducted?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", "external_knowledge": "None" }, { "question": "Show the names of conductors that have conducted more than one orchestras.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the names of conductors that have conducted more than one orchestras.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1", "external_knowledge": "None" }, { "question": "What are the names of conductors who have conducted at more than one orchestra?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of conductors who have conducted at more than one orchestra?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1", "external_knowledge": "None" }, { "question": "Show the name of the conductor that has conducted the most number of orchestras.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the name of the conductor that has conducted the most number of orchestras.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the name of the conductor who has conducted the most orchestras?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the conductor who has conducted the most orchestras?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Please show the name of the conductor that has conducted orchestras founded after 2008.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nPlease show the name of the conductor that has conducted orchestras founded after 2008.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008", "external_knowledge": "None" }, { "question": "What are the names of conductors who have conducted orchestras founded after the year 2008?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of conductors who have conducted orchestras founded after the year 2008?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008", "external_knowledge": "None" }, { "question": "Please show the different record companies and the corresponding number of orchestras.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nPlease show the different record companies and the corresponding number of orchestras.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company", "external_knowledge": "None" }, { "question": "How many orchestras does each record company manage?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many orchestras does each record company manage?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company", "external_knowledge": "None" }, { "question": "Please show the record formats of orchestras in ascending order of count.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nPlease show the record formats of orchestras in ascending order of count.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC", "external_knowledge": "None" }, { "question": "What are the major record formats of orchestras, sorted by their frequency?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the major record formats of orchestras, sorted by their frequency?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC", "external_knowledge": "None" }, { "question": "List the record company shared by the most number of orchestras.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the record company shared by the most number of orchestras.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the record company used by the greatest number of orchestras?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the record company used by the greatest number of orchestras?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "List the names of orchestras that have no performance.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the names of orchestras that have no performance.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)", "external_knowledge": "None" }, { "question": "What are the orchestras that do not have any performances?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the orchestras that do not have any performances?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)", "external_knowledge": "None" }, { "question": "Show the record companies shared by orchestras founded before 2003 and after 2003.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the record companies shared by orchestras founded before 2003 and after 2003.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003", "external_knowledge": "None" }, { "question": "What are the record companies that are used by both orchestras founded before 2003 and those founded after 2003?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the record companies that are used by both orchestras founded before 2003 and those founded after 2003?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003", "external_knowledge": "None" }, { "question": "Find the number of orchestras whose record format is \"CD\" or \"DVD\".", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['DVD', 'CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['DVD', 'CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of orchestras whose record format is \"CD\" or \"DVD\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"", "external_knowledge": "None" }, { "question": "Count the number of orchestras that have CD or DVD as their record format.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['DVD', 'CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['DVD', 'CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of orchestras that have CD or DVD as their record format.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"", "external_knowledge": "None" }, { "question": "Show the years in which orchestras that have given more than one performance are founded.", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the years in which orchestras that have given more than one performance are founded.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1", "external_knowledge": "None" }, { "question": "What are years of founding for orchestras that have had more than a single performance?", "schema": "CREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE conductor (\n Conductor_ID number, -- example: [1, 2]\n Name text, -- example: ['Antal Doráti', 'Igor Stravinsky']\n Age number, -- example: [40, 41]\n Nationality text, -- example: ['USA', 'UK']\n Year_of_Work number, -- example: [10, 11]\n PRIMARY KEY (Conductor_ID)\n);\n\nCREATE TABLE orchestra (\n Orchestra_ID number, -- example: [1, 2]\n Orchestra text, -- example: ['London Symphony Orchestra', 'Columbia Symphony Orchestra']\n Conductor_ID number, -- example: [1, 2]\n Record_Company text, -- example: ['Mercury Records', 'Columbia Masterworks']\n Year_of_Founded number, -- example: [2003.0, 2009.0]\n Major_Record_Format text, -- example: ['CD', 'CD / LP']\n PRIMARY KEY (Orchestra_ID),\n CONSTRAINT fk_orchestra_conductor_id FOREIGN KEY (Conductor_ID) REFERENCES conductor (Conductor_ID)\n);\n\nCREATE TABLE performance (\n Performance_ID number, -- example: [1, 2]\n Orchestra_ID number, -- example: [1, 2]\n Type text, -- example: ['Auditions 1', 'Auditions 2']\n `Date` text, -- example: ['9 June', '10 June']\n `Official_ratings_(millions)` number, -- example: [5.2, 6.73]\n Weekly_rank text, -- example: ['12', '8']\n Share text, -- example: ['22.7%', '28.0%']\n PRIMARY KEY (Performance_ID),\n CONSTRAINT fk_performance_orchestra_id FOREIGN KEY (Orchestra_ID) REFERENCES orchestra (Orchestra_ID)\n);\n\nCREATE TABLE show (\n Show_ID number, -- example: [1, 2]\n Performance_ID number, -- example: [1, 2]\n If_first_show others, -- example: ['Glebe Park', 'Fir Park']\n Result text, -- example: ['T', 'F']\n Attendance number, -- example: [1026.0, 695.0]\n CONSTRAINT fk_show_performance_id FOREIGN KEY (Performance_ID) REFERENCES performance (Performance_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are years of founding for orchestras that have had more than a single performance?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1", "external_knowledge": "None" }, { "question": "How many high schoolers are there?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many high schoolers are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Highschooler", "external_knowledge": "None" }, { "question": "Count the number of high schoolers.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of high schoolers.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Highschooler", "external_knowledge": "None" }, { "question": "Show the names and grades of each high schooler.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the names and grades of each high schooler.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , grade FROM Highschooler", "external_knowledge": "None" }, { "question": "What are the names and grades for each high schooler?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names and grades for each high schooler?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , grade FROM Highschooler", "external_knowledge": "None" }, { "question": "Show all the grades of the high schoolers.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow all the grades of the high schoolers.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT grade FROM Highschooler", "external_knowledge": "None" }, { "question": "What is the grade of each high schooler?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the grade of each high schooler?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT grade FROM Highschooler", "external_knowledge": "None" }, { "question": "What grade is Kyle in?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat grade is Kyle in?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT grade FROM Highschooler WHERE name = \"Kyle\"", "external_knowledge": "None" }, { "question": "Return the grade for the high schooler named Kyle.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the grade for the high schooler named Kyle.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT grade FROM Highschooler WHERE name = \"Kyle\"", "external_knowledge": "None" }, { "question": "Show the names of all high schoolers in grade 10.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the names of all high schoolers in grade 10.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM Highschooler WHERE grade = 10", "external_knowledge": "None" }, { "question": "What are the names of all high schoolers in grade 10?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of all high schoolers in grade 10?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM Highschooler WHERE grade = 10", "external_knowledge": "None" }, { "question": "Show the ID of the high schooler named Kyle.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the ID of the high schooler named Kyle.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT ID FROM Highschooler WHERE name = \"Kyle\"", "external_knowledge": "None" }, { "question": "What is Kyle's id?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is Kyle's id?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT ID FROM Highschooler WHERE name = \"Kyle\"", "external_knowledge": "None" }, { "question": "How many high schoolers are there in grade 9 or 10?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many high schoolers are there in grade 9 or 10?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Highschooler WHERE grade = 9 OR grade = 10", "external_knowledge": "None" }, { "question": "Count the number of high schoolers in grades 9 or 10.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of high schoolers in grades 9 or 10.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Highschooler WHERE grade = 9 OR grade = 10", "external_knowledge": "None" }, { "question": "Show the number of high schoolers for each grade.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the number of high schoolers for each grade.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT grade , count(*) FROM Highschooler GROUP BY grade", "external_knowledge": "None" }, { "question": "How many high schoolers are in each grade?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many high schoolers are in each grade?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT grade , count(*) FROM Highschooler GROUP BY grade", "external_knowledge": "None" }, { "question": "Which grade has the most high schoolers?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich grade has the most high schoolers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Return the grade that has the greatest number of high schoolers.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the grade that has the greatest number of high schoolers.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Show me all grades that have at least 4 students.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow me all grades that have at least 4 students.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4", "external_knowledge": "None" }, { "question": "Which grades have 4 or more high schoolers?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich grades have 4 or more high schoolers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4", "external_knowledge": "None" }, { "question": "Show the student IDs and numbers of friends corresponding to each.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the student IDs and numbers of friends corresponding to each.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT student_id , count(*) FROM Friend GROUP BY student_id", "external_knowledge": "None" }, { "question": "How many friends does each student have?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many friends does each student have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT student_id , count(*) FROM Friend GROUP BY student_id", "external_knowledge": "None" }, { "question": "Show the names of high school students and their corresponding number of friends.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the names of high school students and their corresponding number of friends.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name , count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "external_knowledge": "None" }, { "question": "What are the names of the high schoolers and how many friends does each have?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the high schoolers and how many friends does each have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name , count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "external_knowledge": "None" }, { "question": "What is the name of the high schooler who has the greatest number of friends?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the high schooler who has the greatest number of friends?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Return the name of the high school student with the most friends.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the name of the high school student with the most friends.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Show the names of high schoolers who have at least 3 friends.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the names of high schoolers who have at least 3 friends.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3", "external_knowledge": "None" }, { "question": "What are the names of high schoolers who have 3 or more friends?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of high schoolers who have 3 or more friends?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3", "external_knowledge": "None" }, { "question": "Show the names of all of the high schooler Kyle's friends.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the names of all of the high schooler Kyle's friends.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = \"Kyle\"", "external_knowledge": "None" }, { "question": "Return the names of friends of the high school student Kyle.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the names of friends of the high school student Kyle.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = \"Kyle\"", "external_knowledge": "None" }, { "question": "How many friends does the high school student Kyle have?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many friends does the high school student Kyle have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "external_knowledge": "None" }, { "question": "Count the number of friends Kyle has.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of friends Kyle has.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "external_knowledge": "None" }, { "question": "Show ids of all students who do not have any friends.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow ids of all students who do not have any friends.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend", "external_knowledge": "None" }, { "question": "What are the ids of high school students who do not have friends?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids of high school students who do not have friends?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend", "external_knowledge": "None" }, { "question": "Show names of all high school students who do not have any friends.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow names of all high school students who do not have any friends.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", "external_knowledge": "None" }, { "question": "What are the names of students who have no friends?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of students who have no friends?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", "external_knowledge": "None" }, { "question": "Show the ids of high schoolers who have friends and are also liked by someone else.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the ids of high schoolers who have friends and are also liked by someone else.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes", "external_knowledge": "None" }, { "question": "What are the ids of students who both have friends and are liked?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the ids of students who both have friends and are liked?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes", "external_knowledge": "None" }, { "question": "Show name of all students who have some friends and also are liked by someone else.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow name of all students who have some friends and also are liked by someone else.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", "external_knowledge": "None" }, { "question": "What are the names of high schoolers who both have friends and are liked?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of high schoolers who both have friends and are liked?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", "external_knowledge": "None" }, { "question": "Count the number of likes for each student id.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of likes for each student id.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT student_id , count(*) FROM Likes GROUP BY student_id", "external_knowledge": "None" }, { "question": "How many likes correspond to each student id?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many likes correspond to each student id?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT student_id , count(*) FROM Likes GROUP BY student_id", "external_knowledge": "None" }, { "question": "Show the names of high schoolers who have likes, and numbers of likes for each.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the names of high schoolers who have likes, and numbers of likes for each.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "external_knowledge": "None" }, { "question": "What are the names of high schoolers who have likes, and how many likes does each have?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of high schoolers who have likes, and how many likes does each have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "external_knowledge": "None" }, { "question": "What is the name of the high schooler who has the greatest number of likes?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the high schooler who has the greatest number of likes?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Give the name of the student with the most likes.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive the name of the student with the most likes.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Show the names of students who have at least 2 likes.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the names of students who have at least 2 likes.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2", "external_knowledge": "None" }, { "question": "What are the names of students who have 2 or more likes?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of students who have 2 or more likes?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2", "external_knowledge": "None" }, { "question": "Show the names of students who have a grade higher than 5 and have at least 2 friends.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the names of students who have a grade higher than 5 and have at least 2 friends.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2", "external_knowledge": "None" }, { "question": "What are the names of high schoolers who have a grade of over 5 and have 2 or more friends?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of high schoolers who have a grade of over 5 and have 2 or more friends?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2", "external_knowledge": "None" }, { "question": "How many likes does Kyle have?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many likes does Kyle have?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "external_knowledge": "None" }, { "question": "Return the number of likes that the high schooler named Kyle has.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Kyle', 'Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the number of likes that the high schooler named Kyle has.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "external_knowledge": "None" }, { "question": "Find the average grade of all students who have some friends.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the average grade of all students who have some friends.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "external_knowledge": "None" }, { "question": "What is the average grade of students who have friends?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average grade of students who have friends?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "external_knowledge": "None" }, { "question": "Find the minimum grade of students who have no friends.", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the minimum grade of students who have no friends.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "external_knowledge": "None" }, { "question": "What is the lowest grade of students who do not have any friends?", "schema": "CREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Highschooler (\n ID number, -- example: [1025, 1101]\n name text, -- example: ['Jordan', 'Gabriel']\n grade number, -- example: [9, 10]\n PRIMARY KEY (ID)\n);\n\nCREATE TABLE Friend (\n student_id number, -- example: [1101, 1247]\n friend_id number, -- example: [1381, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_friend_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_friend_friend_id FOREIGN KEY (friend_id) REFERENCES Highschooler (ID)\n);\n\nCREATE TABLE Likes (\n student_id number, -- example: [1025, 1247]\n liked_id number, -- example: [1709, 1689]\n PRIMARY KEY (student_id),\n CONSTRAINT fk_likes_student_id FOREIGN KEY (student_id) REFERENCES Highschooler (ID),\n CONSTRAINT fk_likes_liked_id FOREIGN KEY (liked_id) REFERENCES Highschooler (ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the lowest grade of students who do not have any friends?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "external_knowledge": "None" }, { "question": "Which states have both owners and professionals living there?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich states have both owners and professionals living there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT state FROM Owners INTERSECT SELECT state FROM Professionals", "external_knowledge": "None" }, { "question": "Find the states where both owners and professionals live.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the states where both owners and professionals live.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT state FROM Owners INTERSECT SELECT state FROM Professionals", "external_knowledge": "None" }, { "question": "What is the average age of the dogs who have gone through any treatments?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average age of the dogs who have gone through any treatments?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", "external_knowledge": "None" }, { "question": "Find the average age of the dogs who went through treatments.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the average age of the dogs who went through treatments.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", "external_knowledge": "None" }, { "question": "Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Indiana', 'Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Indiana', 'Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2", "external_knowledge": "None" }, { "question": "Find the id, last name and cell phone of the professionals who live in the state of Indiana or have performed more than two treatments.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Indiana', 'Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Indiana', 'Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the id, last name and cell phone of the professionals who live in the state of Indiana or have performed more than two treatments.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2", "external_knowledge": "None" }, { "question": "Which dogs have not cost their owner more than 1000 for treatment ? List the dog names .", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich dogs have not cost their owner more than 1000 for treatment ? List the dog names .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment) > 1000 )", "external_knowledge": "None" }, { "question": "What are the names of the dogs for which the owner has not spend more than 1000 for treatment ?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the dogs for which the owner has not spend more than 1000 for treatment ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment) > 1000 )", "external_knowledge": "None" }, { "question": "Which first names are used for professionals or owners but are not used as dog names?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich first names are used for professionals or owners but are not used as dog names?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs", "external_knowledge": "None" }, { "question": "Find the first names that are used for professionals or owners but are not used as dog names.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the first names that are used for professionals or owners but are not used as dog names.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs", "external_knowledge": "None" }, { "question": "Which professional did not operate any treatment on dogs? List the professional's id, role and email.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich professional did not operate any treatment on dogs? List the professional's id, role and email.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id", "external_knowledge": "None" }, { "question": "Give me the id, role and email of the professionals who did not perform any treatment on dogs.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive me the id, role and email of the professionals who did not perform any treatment on dogs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id", "external_knowledge": "None" }, { "question": "Which owner owns the most dogs? List the owner id, first name and last name.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich owner owns the most dogs? List the owner id, first name and last name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Return the owner id, first name and last name of the owner who has the most dogs.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the owner id, first name and last name of the owner who has the most dogs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which professionals have done at least two treatments? List the professional's id, role, and first name.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich professionals have done at least two treatments? List the professional's id, role, and first name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "external_knowledge": "None" }, { "question": "What are the id, role, and first name of the professionals who have performed two or more treatments?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the id, role, and first name of the professionals who have performed two or more treatments?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "external_knowledge": "None" }, { "question": "What is the name of the breed with the most dogs?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the breed with the most dogs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which breed do the most dogs have? Give me the breed name.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich breed do the most dogs have? Give me the breed name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which owner has paid for the most treatments on his or her dogs? List the owner id and last name.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich owner has paid for the most treatments on his or her dogs? List the owner id and last name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Tell me the owner id and last name of the owner who spent the most on treatments of his or her dogs.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nTell me the owner id and last name of the owner who spent the most on treatments of his or her dogs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the description of the treatment type that costs the least money in total?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the description of the treatment type that costs the least money in total?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1", "external_knowledge": "None" }, { "question": "Give me the description of the treatment type whose total cost is the lowest.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nGive me the description of the treatment type whose total cost is the lowest.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1", "external_knowledge": "None" }, { "question": "Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Find the owner id and zip code of the owner who spent the most money in total for his or her dogs.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the owner id and zip code of the owner who spent the most money in total for his or her dogs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Which professionals have done at least two types of treatments? List the professional id and cell phone.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich professionals have done at least two types of treatments? List the professional id and cell phone.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.professional_id , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "external_knowledge": "None" }, { "question": "Find the id and cell phone of the professionals who operate two or more types of treatments.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the id and cell phone of the professionals who operate two or more types of treatments.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.professional_id , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "external_knowledge": "None" }, { "question": "What are the first name and last name of the professionals who have done treatment with cost below average?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the first name and last name of the professionals who have done treatment with cost below average?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )", "external_knowledge": "None" }, { "question": "Which professionals have operated a treatment that costs less than the average? Give me theor first names and last names.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich professionals have operated a treatment that costs less than the average? Give me theor first names and last names.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )", "external_knowledge": "None" }, { "question": "List the date of each treatment, together with the first name of the professional who operated it.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the date of each treatment, together with the first name of the professional who operated it.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id", "external_knowledge": "None" }, { "question": "What are the date and the operating professional's first name of each treatment?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the date and the operating professional's first name of each treatment?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id", "external_knowledge": "None" }, { "question": "List the cost of each treatment and the corresponding treatment type description.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the cost of each treatment and the corresponding treatment type description.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code", "external_knowledge": "None" }, { "question": "What are the cost and treatment type description of each treatment?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the cost and treatment type description of each treatment?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code", "external_knowledge": "None" }, { "question": "List each owner's first name, last name, and the size of his for her dog.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList each owner's first name, last name, and the size of his for her dog.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "external_knowledge": "None" }, { "question": "What are each owner's first name, last name, and the size of their dog?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are each owner's first name, last name, and the size of their dog?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "external_knowledge": "None" }, { "question": "List pairs of the owner's first name and the dogs's name.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList pairs of the owner's first name and the dogs's name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "external_knowledge": "None" }, { "question": "What are each owner's first name and their dogs's name?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are each owner's first name and their dogs's name?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "external_knowledge": "None" }, { "question": "List the names of the dogs of the rarest breed and the treatment dates of them.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the names of the dogs of the rarest breed and the treatment dates of them.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )", "external_knowledge": "None" }, { "question": "Which dogs are of the rarest breed? Show their names and treatment dates.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich dogs are of the rarest breed? Show their names and treatment dates.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )", "external_knowledge": "None" }, { "question": "Which dogs are owned by someone who lives in Virginia? List the owner's first name and the dog's name.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Virginia', 'Wisconsin']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Virginia', 'Wisconsin']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich dogs are owned by someone who lives in Virginia? List the owner's first name and the dog's name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia'", "external_knowledge": "None" }, { "question": "Find the first names of owners living in Virginia and the names of dogs they own.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Virginia', 'Wisconsin']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Virginia', 'Wisconsin']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the first names of owners living in Virginia and the names of dogs they own.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia'", "external_knowledge": "None" }, { "question": "What are the arriving date and the departing date of the dogs who have gone through a treatment?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the arriving date and the departing date of the dogs who have gone through a treatment?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.date_arrived , T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id", "external_knowledge": "None" }, { "question": "Find the arriving date and the departing date of the dogs that received a treatment.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the arriving date and the departing date of the dogs that received a treatment.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.date_arrived , T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id", "external_knowledge": "None" }, { "question": "List the last name of the owner owning the youngest dog.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the last name of the owner owning the youngest dog.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT max(age) FROM Dogs )", "external_knowledge": "None" }, { "question": "Who owns the youngest dog? Give me his or her last name.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWho owns the youngest dog? Give me his or her last name.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT max(age) FROM Dogs )", "external_knowledge": "None" }, { "question": "List the emails of the professionals who live in the state of Hawaii or the state of Wisconsin.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Wisconsin', 'Hawaii', 'Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Wisconsin', 'Hawaii', 'Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the emails of the professionals who live in the state of Hawaii or the state of Wisconsin.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'", "external_knowledge": "None" }, { "question": "What are the emails of the professionals living in either the state of Hawaii or the state of Wisconsin?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Wisconsin', 'Hawaii', 'Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Wisconsin', 'Hawaii', 'Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the emails of the professionals living in either the state of Hawaii or the state of Wisconsin?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'", "external_knowledge": "None" }, { "question": "What are the arriving date and the departing date of all the dogs?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the arriving date and the departing date of all the dogs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT date_arrived , date_departed FROM Dogs", "external_knowledge": "None" }, { "question": "List the arrival date and the departure date for all the dogs.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the arrival date and the departure date for all the dogs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT date_arrived , date_departed FROM Dogs", "external_knowledge": "None" }, { "question": "How many dogs went through any treatments?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many dogs went through any treatments?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT dog_id) FROM Treatments", "external_knowledge": "None" }, { "question": "Count the number of dogs that went through a treatment.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of dogs that went through a treatment.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT dog_id) FROM Treatments", "external_knowledge": "None" }, { "question": "How many professionals have performed any treatment to dogs?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many professionals have performed any treatment to dogs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT professional_id) FROM Treatments", "external_knowledge": "None" }, { "question": "Find the number of professionals who have ever treated dogs.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of professionals who have ever treated dogs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(DISTINCT professional_id) FROM Treatments", "external_knowledge": "None" }, { "question": "Which professionals live in a city containing the substring 'West'? List his or her role, street, city and state.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich professionals live in a city containing the substring 'West'? List his or her role, street, city and state.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'", "external_knowledge": "None" }, { "question": "Find the role, street, city and state of the professionals living in a city that contains the substring 'West'.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the role, street, city and state of the professionals living in a city that contains the substring 'West'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'", "external_knowledge": "None" }, { "question": "Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhich owners live in the state whose name contains the substring 'North'? List his first name, last name and email.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'", "external_knowledge": "None" }, { "question": "Return the first name, last name and email of the owners living in a state whose name contains the substring 'North'.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nReturn the first name, last name and email of the owners living in a state whose name contains the substring 'North'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'", "external_knowledge": "None" }, { "question": "How many dogs have an age below the average?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many dogs have an age below the average?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )", "external_knowledge": "None" }, { "question": "Count the number of dogs of an age below the average.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCount the number of dogs of an age below the average.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )", "external_knowledge": "None" }, { "question": "How much does the most recent treatment cost?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow much does the most recent treatment cost?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Show me the cost of the most recently performed treatment.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow me the cost of the most recently performed treatment.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1", "external_knowledge": "None" }, { "question": "How many dogs have not gone through any treatment?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many dogs have not gone through any treatment?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Dogs WHERE dog_id NOT IN ( SELECT dog_id FROM Treatments )", "external_knowledge": "None" }, { "question": "Tell me the number of dogs that have not received any treatment .", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nTell me the number of dogs that have not received any treatment .\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select count(*) from dogs where dog_id not in ( select dog_id from treatments )", "external_knowledge": "None" }, { "question": "How many owners temporarily do not have any dogs?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many owners temporarily do not have any dogs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )", "external_knowledge": "None" }, { "question": "Find the number of owners who do not own any dogs at this moment.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of owners who do not own any dogs at this moment.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )", "external_knowledge": "None" }, { "question": "How many professionals did not operate any treatment on dogs?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many professionals did not operate any treatment on dogs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )", "external_knowledge": "None" }, { "question": "Find the number of professionals who have not treated any dogs.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the number of professionals who have not treated any dogs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )", "external_knowledge": "None" }, { "question": "List the dog name, age and weight of the dogs who have been abandoned? 1 stands for yes, and 0 stands for no.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the dog name, age and weight of the dogs who have been abandoned? 1 stands for yes, and 0 stands for no.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1", "external_knowledge": "None" }, { "question": "What are the dog name, age and weight of the dogs that were abandoned? Note that 1 stands for yes, and 0 stands for no in the tables.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the dog name, age and weight of the dogs that were abandoned? Note that 1 stands for yes, and 0 stands for no in the tables.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1", "external_knowledge": "None" }, { "question": "What is the average age of all the dogs?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the average age of all the dogs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(age) FROM Dogs", "external_knowledge": "None" }, { "question": "Compute the average age of all the dogs.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nCompute the average age of all the dogs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT avg(age) FROM Dogs", "external_knowledge": "None" }, { "question": "What is the age of the oldest dog?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the age of the oldest dog?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(age) FROM Dogs", "external_knowledge": "None" }, { "question": "Tell me the age of the oldest dog.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nTell me the age of the oldest dog.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(age) FROM Dogs", "external_knowledge": "None" }, { "question": "How much does each charge type costs? List both charge type and amount.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow much does each charge type costs? List both charge type and amount.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT charge_type , charge_amount FROM Charges", "external_knowledge": "None" }, { "question": "List each charge type and its amount.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList each charge type and its amount.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT charge_type , charge_amount FROM Charges", "external_knowledge": "None" }, { "question": "How much does the most expensive charge type costs?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow much does the most expensive charge type costs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(charge_amount) FROM Charges", "external_knowledge": "None" }, { "question": "What is the charge amount of the most expensive charge type?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the charge amount of the most expensive charge type?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT max(charge_amount) FROM Charges", "external_knowledge": "None" }, { "question": "List the email, cell phone and home phone of all the professionals.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the email, cell phone and home phone of all the professionals.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT email_address , cell_number , home_phone FROM professionals", "external_knowledge": "None" }, { "question": "What are the email, cell phone and home phone of each professional?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the email, cell phone and home phone of each professional?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT email_address , cell_number , home_phone FROM professionals", "external_knowledge": "None" }, { "question": "What are all the possible breed type and size type combinations?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are all the possible breed type and size type combinations?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT breed_code , size_code FROM dogs", "external_knowledge": "None" }, { "question": "Find the distinct breed type and size type combinations for dogs.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFind the distinct breed type and size type combinations for dogs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT breed_code , size_code FROM dogs", "external_knowledge": "None" }, { "question": "List the first name of all the professionals along with the description of the treatment they have done.", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the first name of all the professionals along with the description of the treatment they have done.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code", "external_knowledge": "None" }, { "question": "What are each professional's first name and description of the treatment they have performed?", "schema": "CREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Breeds (\n breed_code text, -- example: ['BUL', 'ESK']\n breed_name text, -- example: ['Eskimo', 'Husky']\n PRIMARY KEY (breed_code)\n);\n\nCREATE TABLE Charges (\n charge_id number, -- example: [1, 2]\n charge_type text, -- example: ['Daily Accommodation', 'Drugs']\n charge_amount number, -- example: [98, 322]\n PRIMARY KEY (charge_id)\n);\n\nCREATE TABLE Sizes (\n size_code text, -- example: ['LGE', 'MED']\n size_description text, -- example: ['Small', 'Medium']\n PRIMARY KEY (size_code)\n);\n\nCREATE TABLE Treatment_Types (\n treatment_type_code text, -- example: ['EXAM', 'VAC']\n treatment_type_description text, -- example: ['Physical examination', 'Vaccination']\n PRIMARY KEY (treatment_type_code)\n);\n\nCREATE TABLE Owners (\n owner_id number, -- example: [1, 2]\n first_name text, -- example: ['Nora', 'Melisa']\n last_name text, -- example: ['Haley', 'DuBuque']\n street text, -- example: ['0647 Hintz Village Apt. 024', '1204 Mae Highway Apt. 107']\n city text, -- example: ['Lake Tia', 'Port Reannamouth']\n state text, -- example: ['Wisconsin', 'Virginia']\n zip_code text, -- example: ['93165', '45244']\n email_address text, -- example: ['lynn81@example.org', 'ykris@example.com']\n home_phone text, -- example: ['1-682-845-0116x63235', '(799)563-0260x454']\n cell_number text, -- example: ['478.978.0729', '(722)768-5439x484']\n PRIMARY KEY (owner_id)\n);\n\nCREATE TABLE Dogs (\n dog_id number, -- example: [1, 2]\n owner_id number, -- example: [3, 11]\n abandoned_yn text, -- abandoned yes or no, example: ['1', '0']\n breed_code text, -- example: ['ESK', 'BUL']\n size_code text, -- example: ['LGE', 'MED']\n name text, -- example: ['Kacey', 'Hipolito']\n age text, -- example: ['6', '9']\n date_of_birth time, -- example: ['2012-01-27 05:11:53', '2013-02-13 05:15:21']\n gender text, -- example: ['1', '0']\n weight text, -- example: ['7.57', '1.72']\n date_arrived time, -- example: ['2017-09-08 20:10:13', '2017-12-22 05:02:02']\n date_adopted time, -- example: ['2018-03-06 16:32:11', '2018-03-25 08:12:51']\n date_departed time, -- example: ['2018-03-25 06:58:44', '2018-03-25 02:11:32']\n PRIMARY KEY (dog_id),\n CONSTRAINT fk_dogs_owner_id FOREIGN KEY (owner_id) REFERENCES Owners (owner_id),\n CONSTRAINT fk_dogs_breed_code FOREIGN KEY (breed_code) REFERENCES Breeds (breed_code),\n CONSTRAINT fk_dogs_size_code FOREIGN KEY (size_code) REFERENCES Sizes (size_code)\n);\n\nCREATE TABLE Professionals (\n professional_id number, -- example: [1, 2]\n role_code text, -- example: ['Employee', 'Veterenarian']\n first_name text, -- example: ['Taryn', 'Jayson']\n street text, -- example: ['6915 Oberbrunner Point Suite 491\\nGleason', '88665 Terence Lodge Apt. 904\\nCorneliusfo']\n city text, -- example: ['West Heidi', 'North Odellfurt']\n state text, -- example: ['Indiana', 'Connecticut']\n zip_code text, -- example: ['06646', '43129']\n last_name text, -- example: ['Braun', 'Ullrich']\n email_address text, -- example: ['deanna.schuster@example.com', 'lucile.shanahan@example.org']\n home_phone text, -- example: ['+71(6)2898266914', '+02(1)0259033559']\n cell_number text, -- example: ['(275)939-2435x80863', '889-940-2676']\n PRIMARY KEY (professional_id)\n);\n\nCREATE TABLE Treatments (\n treatment_id number, -- example: [1, 2]\n dog_id number, -- example: [14, 4]\n professional_id number, -- example: [9, 10]\n treatment_type_code text, -- example: ['WALK', 'VAC']\n date_of_treatment time, -- example: ['2018-03-19 04:39:54', '2018-03-15 20:25:34']\n cost_of_treatment number, -- example: [567, 147]\n PRIMARY KEY (treatment_id),\n CONSTRAINT fk_treatments_dog_id FOREIGN KEY (dog_id) REFERENCES Dogs (dog_id),\n CONSTRAINT fk_treatments_professional_id FOREIGN KEY (professional_id) REFERENCES Professionals (professional_id),\n CONSTRAINT fk_treatments_treatment_type_code FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types (treatment_type_code)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are each professional's first name and description of the treatment they have performed?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code", "external_knowledge": "None" }, { "question": "How many singers are there?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many singers are there?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM singer", "external_knowledge": "None" }, { "question": "What is the count of singers?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the count of singers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM singer", "external_knowledge": "None" }, { "question": "List the name of singers in ascending order of net worth.", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the name of singers in ascending order of net worth.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC", "external_knowledge": "None" }, { "question": "What are the names of singers ordered by ascending net worth?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of singers ordered by ascending net worth?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC", "external_knowledge": "None" }, { "question": "What are the birth year and citizenship of singers?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the birth year and citizenship of singers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Birth_Year , Citizenship FROM singer", "external_knowledge": "None" }, { "question": "What are the birth years and citizenships of the singers?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the birth years and citizenships of the singers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Birth_Year , Citizenship FROM singer", "external_knowledge": "None" }, { "question": "List the name of singers whose citizenship is not \"France\".", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the name of singers whose citizenship is not \"France\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM singer WHERE Citizenship != \"France\"", "external_knowledge": "None" }, { "question": "What are the names of the singers who are not French citizens?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the singers who are not French citizens?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM singer WHERE Citizenship != \"France\"", "external_knowledge": "None" }, { "question": "Show the name of singers whose birth year is either 1948 or 1949?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the name of singers whose birth year is either 1948 or 1949?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949", "external_knowledge": "None" }, { "question": "What are the names of the singers whose birth years are either 1948 or 1949?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the singers whose birth years are either 1948 or 1949?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949", "external_knowledge": "None" }, { "question": "What is the name of the singer with the largest net worth?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the singer with the largest net worth?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the name of the singer who is worth the most?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the name of the singer who is worth the most?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1", "external_knowledge": "None" }, { "question": "Show different citizenship of singers and the number of singers of each citizenship.", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow different citizenship of singers and the number of singers of each citizenship.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Citizenship , COUNT(*) FROM singer GROUP BY Citizenship", "external_knowledge": "None" }, { "question": "For each citizenship, how many singers are from that country?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor each citizenship, how many singers are from that country?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Citizenship , COUNT(*) FROM singer GROUP BY Citizenship", "external_knowledge": "None" }, { "question": "Please show the most common citizenship of singers.", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nPlease show the most common citizenship of singers.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC LIMIT 1", "external_knowledge": "None" }, { "question": "What is the most common singer citizenship ?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the most common singer citizenship ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "select citizenship from singer group by citizenship order by count(*) desc limit 1", "external_knowledge": "None" }, { "question": "Show different citizenships and the maximum net worth of singers of each citizenship.", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow different citizenships and the maximum net worth of singers of each citizenship.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship", "external_knowledge": "None" }, { "question": "For each citizenship, what is the maximum net worth?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor each citizenship, what is the maximum net worth?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship", "external_knowledge": "None" }, { "question": "Show titles of songs and names of singers.", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow titles of songs and names of singers.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Title , T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID", "external_knowledge": "None" }, { "question": "What are the song titles and singer names?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the song titles and singer names?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.Title , T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID", "external_knowledge": "None" }, { "question": "Show distinct names of singers that have songs with sales more than 300000.", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow distinct names of singers that have songs with sales more than 300000.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000", "external_knowledge": "None" }, { "question": "what are the different names of the singers that have sales more than 300000?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nwhat are the different names of the singers that have sales more than 300000?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000", "external_knowledge": "None" }, { "question": "Show the names of singers that have more than one song.", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the names of singers that have more than one song.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT(*) > 1", "external_knowledge": "None" }, { "question": "What are the names of the singers that have more than one songs?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of the singers that have more than one songs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT(*) > 1", "external_knowledge": "None" }, { "question": "Show the names of singers and the total sales of their songs.", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the names of singers and the total sales of their songs.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name , sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name", "external_knowledge": "None" }, { "question": "For each singer name, what is the total sales for their songs?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFor each singer name, what is the total sales for their songs?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T1.Name , sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name", "external_knowledge": "None" }, { "question": "List the name of singers that do not have any song.", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nList the name of singers that do not have any song.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song)", "external_knowledge": "None" }, { "question": "What is the sname of every sing that does not have any song?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the sname of every sing that does not have any song?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song)", "external_knowledge": "None" }, { "question": "Show the citizenship shared by singers with birth year before 1945 and after 1955.", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the citizenship shared by singers with birth year before 1945 and after 1955.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955", "external_knowledge": "None" }, { "question": "What are the citizenships that are shared by singers with a birth year before 1945 and after 1955?", "schema": "CREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE singer (\n Singer_ID number, -- example: [1, 2]\n Name text, -- example: ['Liliane Bettencourt', 'Christy Walton']\n Birth_Year number, -- example: [1944.0, 1948.0]\n Net_Worth_Millions number, -- example: [30.0, 28.8]\n Citizenship text, -- example: ['France', 'United States']\n PRIMARY KEY (Singer_ID)\n);\n\nCREATE TABLE song (\n Song_ID number, -- example: [1, 2]\n Title text, -- example: [\"Do They Know It's Christmas\", \"F**k It (I Don't Want You Back)\"]\n Singer_ID number, -- example: [1, 2]\n Sales number, -- example: [1094000.0, 552407.0]\n Highest_Position number, -- example: [1.0, 3.0]\n PRIMARY KEY (Song_ID),\n CONSTRAINT fk_song_singer_id FOREIGN KEY (Singer_ID) REFERENCES singer (Singer_ID)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the citizenships that are shared by singers with a birth year before 1945 and after 1955?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955", "external_knowledge": "None" }, { "question": "How many available features are there in total?", "schema": "CREATE TABLE Ref_Feature_Types (\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_type_name text, -- example: ['Amenity, eg Pool.', 'Securiyt, eg Burglar Alarm.']\n PRIMARY KEY (feature_type_code)\n);\n\nCREATE TABLE Ref_Property_Types (\n property_type_code text, -- example: ['Apartment', 'Field']\n property_type_description text, -- example: ['House, Bungalow, etc.', 'Apartment, Flat, Condo, etc.']\n PRIMARY KEY (property_type_code)\n);\n\nCREATE TABLE Other_Available_Features (\n feature_id number, -- example: [2, 3]\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_name text, -- example: ['AirCon', 'Pool']\n feature_description text, -- example: ['Air Conditioning.', 'Swimming Pool.']\n PRIMARY KEY (feature_id),\n CONSTRAINT fk_other_available_features_feature_type_code FOREIGN KEY (feature_type_code) REFERENCES Ref_Feature_Types (feature_type_code)\n);\n\nCREATE TABLE Properties (\n property_id number, -- example: [1, 2]\n property_type_code text, -- example: ['House', 'Other']\n date_on_market time, -- example: ['1991-06-21 23:52:10', '1990-05-25 23:01:51']\n date_sold time, -- example: ['1979-05-13 16:58:06', '1990-11-14 19:16:38']\n property_name text, -- example: ['park', 'the cole']\n property_address text, -- example: ['4745 Emerson Stravenue Suite 829\\nSouth G', '098 Tremaine Highway Suite 569\\nSouth Wil']\n room_count number, -- example: [7, 1]\n vendor_requested_price number, -- example: [372652.2909, 661536468.4429]\n buyer_offered_price number, -- example: [1.68, 8.7122]\n agreed_selling_price number, -- example: [4201.8, 21769471.8328]\n apt_feature_1 text, -- example: ['aut', 'est']\n apt_feature_2 text, -- example: ['suscipit', 'est']\n apt_feature_3 text,\n fld_feature_1 text,\n fld_feature_2 text,\n fld_feature_3 text,\n hse_feature_1 text,\n hse_feature_2 text,\n hse_feature_3 text,\n oth_feature_1 text,\n oth_feature_2 text,\n oth_feature_3 text,\n shp_feature_1 text,\n shp_feature_2 text,\n shp_feature_3 text,\n other_property_details text,\n PRIMARY KEY (property_id),\n CONSTRAINT fk_properties_property_type_code FOREIGN KEY (property_type_code) REFERENCES Ref_Property_Types (property_type_code)\n);\n\nCREATE TABLE Other_Property_Features (\n property_id number, -- example: [15, 12]\n feature_id number, -- example: [3, 4]\n property_feature_description text, -- example: ['dolorem', 'earum']\n CONSTRAINT fk_other_property_features_property_id FOREIGN KEY (property_id) REFERENCES Properties (property_id),\n CONSTRAINT fk_other_property_features_feature_id FOREIGN KEY (feature_id) REFERENCES Other_Available_Features (feature_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Feature_Types (\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_type_name text, -- example: ['Amenity, eg Pool.', 'Securiyt, eg Burglar Alarm.']\n PRIMARY KEY (feature_type_code)\n);\n\nCREATE TABLE Ref_Property_Types (\n property_type_code text, -- example: ['Apartment', 'Field']\n property_type_description text, -- example: ['House, Bungalow, etc.', 'Apartment, Flat, Condo, etc.']\n PRIMARY KEY (property_type_code)\n);\n\nCREATE TABLE Other_Available_Features (\n feature_id number, -- example: [2, 3]\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_name text, -- example: ['AirCon', 'Pool']\n feature_description text, -- example: ['Air Conditioning.', 'Swimming Pool.']\n PRIMARY KEY (feature_id),\n CONSTRAINT fk_other_available_features_feature_type_code FOREIGN KEY (feature_type_code) REFERENCES Ref_Feature_Types (feature_type_code)\n);\n\nCREATE TABLE Properties (\n property_id number, -- example: [1, 2]\n property_type_code text, -- example: ['House', 'Other']\n date_on_market time, -- example: ['1991-06-21 23:52:10', '1990-05-25 23:01:51']\n date_sold time, -- example: ['1979-05-13 16:58:06', '1990-11-14 19:16:38']\n property_name text, -- example: ['park', 'the cole']\n property_address text, -- example: ['4745 Emerson Stravenue Suite 829\\nSouth G', '098 Tremaine Highway Suite 569\\nSouth Wil']\n room_count number, -- example: [7, 1]\n vendor_requested_price number, -- example: [372652.2909, 661536468.4429]\n buyer_offered_price number, -- example: [1.68, 8.7122]\n agreed_selling_price number, -- example: [4201.8, 21769471.8328]\n apt_feature_1 text, -- example: ['aut', 'est']\n apt_feature_2 text, -- example: ['suscipit', 'est']\n apt_feature_3 text,\n fld_feature_1 text,\n fld_feature_2 text,\n fld_feature_3 text,\n hse_feature_1 text,\n hse_feature_2 text,\n hse_feature_3 text,\n oth_feature_1 text,\n oth_feature_2 text,\n oth_feature_3 text,\n shp_feature_1 text,\n shp_feature_2 text,\n shp_feature_3 text,\n other_property_details text,\n PRIMARY KEY (property_id),\n CONSTRAINT fk_properties_property_type_code FOREIGN KEY (property_type_code) REFERENCES Ref_Property_Types (property_type_code)\n);\n\nCREATE TABLE Other_Property_Features (\n property_id number, -- example: [15, 12]\n feature_id number, -- example: [3, 4]\n property_feature_description text, -- example: ['dolorem', 'earum']\n CONSTRAINT fk_other_property_features_property_id FOREIGN KEY (property_id) REFERENCES Properties (property_id),\n CONSTRAINT fk_other_property_features_feature_id FOREIGN KEY (feature_id) REFERENCES Other_Available_Features (feature_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nHow many available features are there in total?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT count(*) FROM Other_Available_Features", "external_knowledge": "None" }, { "question": "What is the feature type name of feature AirCon?", "schema": "CREATE TABLE Ref_Feature_Types (\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_type_name text, -- example: ['Amenity, eg Pool.', 'Securiyt, eg Burglar Alarm.']\n PRIMARY KEY (feature_type_code)\n);\n\nCREATE TABLE Ref_Property_Types (\n property_type_code text, -- example: ['Apartment', 'Field']\n property_type_description text, -- example: ['House, Bungalow, etc.', 'Apartment, Flat, Condo, etc.']\n PRIMARY KEY (property_type_code)\n);\n\nCREATE TABLE Other_Available_Features (\n feature_id number, -- example: [2, 3]\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_name text, -- example: ['AirCon', 'Pool']\n feature_description text, -- example: ['Air Conditioning.', 'Swimming Pool.']\n PRIMARY KEY (feature_id),\n CONSTRAINT fk_other_available_features_feature_type_code FOREIGN KEY (feature_type_code) REFERENCES Ref_Feature_Types (feature_type_code)\n);\n\nCREATE TABLE Properties (\n property_id number, -- example: [1, 2]\n property_type_code text, -- example: ['House', 'Other']\n date_on_market time, -- example: ['1991-06-21 23:52:10', '1990-05-25 23:01:51']\n date_sold time, -- example: ['1979-05-13 16:58:06', '1990-11-14 19:16:38']\n property_name text, -- example: ['park', 'the cole']\n property_address text, -- example: ['4745 Emerson Stravenue Suite 829\\nSouth G', '098 Tremaine Highway Suite 569\\nSouth Wil']\n room_count number, -- example: [7, 1]\n vendor_requested_price number, -- example: [372652.2909, 661536468.4429]\n buyer_offered_price number, -- example: [1.68, 8.7122]\n agreed_selling_price number, -- example: [4201.8, 21769471.8328]\n apt_feature_1 text, -- example: ['aut', 'est']\n apt_feature_2 text, -- example: ['suscipit', 'est']\n apt_feature_3 text,\n fld_feature_1 text,\n fld_feature_2 text,\n fld_feature_3 text,\n hse_feature_1 text,\n hse_feature_2 text,\n hse_feature_3 text,\n oth_feature_1 text,\n oth_feature_2 text,\n oth_feature_3 text,\n shp_feature_1 text,\n shp_feature_2 text,\n shp_feature_3 text,\n other_property_details text,\n PRIMARY KEY (property_id),\n CONSTRAINT fk_properties_property_type_code FOREIGN KEY (property_type_code) REFERENCES Ref_Property_Types (property_type_code)\n);\n\nCREATE TABLE Other_Property_Features (\n property_id number, -- example: [15, 12]\n feature_id number, -- example: [3, 4]\n property_feature_description text, -- example: ['dolorem', 'earum']\n CONSTRAINT fk_other_property_features_property_id FOREIGN KEY (property_id) REFERENCES Properties (property_id),\n CONSTRAINT fk_other_property_features_feature_id FOREIGN KEY (feature_id) REFERENCES Other_Available_Features (feature_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Feature_Types (\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_type_name text, -- example: ['Amenity, eg Pool.', 'Securiyt, eg Burglar Alarm.']\n PRIMARY KEY (feature_type_code)\n);\n\nCREATE TABLE Ref_Property_Types (\n property_type_code text, -- example: ['Apartment', 'Field']\n property_type_description text, -- example: ['House, Bungalow, etc.', 'Apartment, Flat, Condo, etc.']\n PRIMARY KEY (property_type_code)\n);\n\nCREATE TABLE Other_Available_Features (\n feature_id number, -- example: [2, 3]\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_name text, -- example: ['AirCon', 'Pool']\n feature_description text, -- example: ['Air Conditioning.', 'Swimming Pool.']\n PRIMARY KEY (feature_id),\n CONSTRAINT fk_other_available_features_feature_type_code FOREIGN KEY (feature_type_code) REFERENCES Ref_Feature_Types (feature_type_code)\n);\n\nCREATE TABLE Properties (\n property_id number, -- example: [1, 2]\n property_type_code text, -- example: ['House', 'Other']\n date_on_market time, -- example: ['1991-06-21 23:52:10', '1990-05-25 23:01:51']\n date_sold time, -- example: ['1979-05-13 16:58:06', '1990-11-14 19:16:38']\n property_name text, -- example: ['park', 'the cole']\n property_address text, -- example: ['4745 Emerson Stravenue Suite 829\\nSouth G', '098 Tremaine Highway Suite 569\\nSouth Wil']\n room_count number, -- example: [7, 1]\n vendor_requested_price number, -- example: [372652.2909, 661536468.4429]\n buyer_offered_price number, -- example: [1.68, 8.7122]\n agreed_selling_price number, -- example: [4201.8, 21769471.8328]\n apt_feature_1 text, -- example: ['aut', 'est']\n apt_feature_2 text, -- example: ['suscipit', 'est']\n apt_feature_3 text,\n fld_feature_1 text,\n fld_feature_2 text,\n fld_feature_3 text,\n hse_feature_1 text,\n hse_feature_2 text,\n hse_feature_3 text,\n oth_feature_1 text,\n oth_feature_2 text,\n oth_feature_3 text,\n shp_feature_1 text,\n shp_feature_2 text,\n shp_feature_3 text,\n other_property_details text,\n PRIMARY KEY (property_id),\n CONSTRAINT fk_properties_property_type_code FOREIGN KEY (property_type_code) REFERENCES Ref_Property_Types (property_type_code)\n);\n\nCREATE TABLE Other_Property_Features (\n property_id number, -- example: [15, 12]\n feature_id number, -- example: [3, 4]\n property_feature_description text, -- example: ['dolorem', 'earum']\n CONSTRAINT fk_other_property_features_property_id FOREIGN KEY (property_id) REFERENCES Properties (property_id),\n CONSTRAINT fk_other_property_features_feature_id FOREIGN KEY (feature_id) REFERENCES Other_Available_Features (feature_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat is the feature type name of feature AirCon?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.feature_type_name FROM Other_Available_Features AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code = T2.feature_type_code WHERE T1.feature_name = \"AirCon\"", "external_knowledge": "None" }, { "question": "Show the property type descriptions of properties belonging to that code.", "schema": "CREATE TABLE Ref_Feature_Types (\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_type_name text, -- example: ['Amenity, eg Pool.', 'Securiyt, eg Burglar Alarm.']\n PRIMARY KEY (feature_type_code)\n);\n\nCREATE TABLE Ref_Property_Types (\n property_type_code text, -- example: ['Apartment', 'Field']\n property_type_description text, -- example: ['House, Bungalow, etc.', 'Apartment, Flat, Condo, etc.']\n PRIMARY KEY (property_type_code)\n);\n\nCREATE TABLE Other_Available_Features (\n feature_id number, -- example: [2, 3]\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_name text, -- example: ['AirCon', 'Pool']\n feature_description text, -- example: ['Air Conditioning.', 'Swimming Pool.']\n PRIMARY KEY (feature_id),\n CONSTRAINT fk_other_available_features_feature_type_code FOREIGN KEY (feature_type_code) REFERENCES Ref_Feature_Types (feature_type_code)\n);\n\nCREATE TABLE Properties (\n property_id number, -- example: [1, 2]\n property_type_code text, -- example: ['House', 'Other']\n date_on_market time, -- example: ['1991-06-21 23:52:10', '1990-05-25 23:01:51']\n date_sold time, -- example: ['1979-05-13 16:58:06', '1990-11-14 19:16:38']\n property_name text, -- example: ['park', 'the cole']\n property_address text, -- example: ['4745 Emerson Stravenue Suite 829\\nSouth G', '098 Tremaine Highway Suite 569\\nSouth Wil']\n room_count number, -- example: [7, 1]\n vendor_requested_price number, -- example: [372652.2909, 661536468.4429]\n buyer_offered_price number, -- example: [1.68, 8.7122]\n agreed_selling_price number, -- example: [4201.8, 21769471.8328]\n apt_feature_1 text, -- example: ['aut', 'est']\n apt_feature_2 text, -- example: ['suscipit', 'est']\n apt_feature_3 text,\n fld_feature_1 text,\n fld_feature_2 text,\n fld_feature_3 text,\n hse_feature_1 text,\n hse_feature_2 text,\n hse_feature_3 text,\n oth_feature_1 text,\n oth_feature_2 text,\n oth_feature_3 text,\n shp_feature_1 text,\n shp_feature_2 text,\n shp_feature_3 text,\n other_property_details text,\n PRIMARY KEY (property_id),\n CONSTRAINT fk_properties_property_type_code FOREIGN KEY (property_type_code) REFERENCES Ref_Property_Types (property_type_code)\n);\n\nCREATE TABLE Other_Property_Features (\n property_id number, -- example: [15, 12]\n feature_id number, -- example: [3, 4]\n property_feature_description text, -- example: ['dolorem', 'earum']\n CONSTRAINT fk_other_property_features_property_id FOREIGN KEY (property_id) REFERENCES Properties (property_id),\n CONSTRAINT fk_other_property_features_feature_id FOREIGN KEY (feature_id) REFERENCES Other_Available_Features (feature_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Feature_Types (\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_type_name text, -- example: ['Amenity, eg Pool.', 'Securiyt, eg Burglar Alarm.']\n PRIMARY KEY (feature_type_code)\n);\n\nCREATE TABLE Ref_Property_Types (\n property_type_code text, -- example: ['Apartment', 'Field']\n property_type_description text, -- example: ['House, Bungalow, etc.', 'Apartment, Flat, Condo, etc.']\n PRIMARY KEY (property_type_code)\n);\n\nCREATE TABLE Other_Available_Features (\n feature_id number, -- example: [2, 3]\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_name text, -- example: ['AirCon', 'Pool']\n feature_description text, -- example: ['Air Conditioning.', 'Swimming Pool.']\n PRIMARY KEY (feature_id),\n CONSTRAINT fk_other_available_features_feature_type_code FOREIGN KEY (feature_type_code) REFERENCES Ref_Feature_Types (feature_type_code)\n);\n\nCREATE TABLE Properties (\n property_id number, -- example: [1, 2]\n property_type_code text, -- example: ['House', 'Other']\n date_on_market time, -- example: ['1991-06-21 23:52:10', '1990-05-25 23:01:51']\n date_sold time, -- example: ['1979-05-13 16:58:06', '1990-11-14 19:16:38']\n property_name text, -- example: ['park', 'the cole']\n property_address text, -- example: ['4745 Emerson Stravenue Suite 829\\nSouth G', '098 Tremaine Highway Suite 569\\nSouth Wil']\n room_count number, -- example: [7, 1]\n vendor_requested_price number, -- example: [372652.2909, 661536468.4429]\n buyer_offered_price number, -- example: [1.68, 8.7122]\n agreed_selling_price number, -- example: [4201.8, 21769471.8328]\n apt_feature_1 text, -- example: ['aut', 'est']\n apt_feature_2 text, -- example: ['suscipit', 'est']\n apt_feature_3 text,\n fld_feature_1 text,\n fld_feature_2 text,\n fld_feature_3 text,\n hse_feature_1 text,\n hse_feature_2 text,\n hse_feature_3 text,\n oth_feature_1 text,\n oth_feature_2 text,\n oth_feature_3 text,\n shp_feature_1 text,\n shp_feature_2 text,\n shp_feature_3 text,\n other_property_details text,\n PRIMARY KEY (property_id),\n CONSTRAINT fk_properties_property_type_code FOREIGN KEY (property_type_code) REFERENCES Ref_Property_Types (property_type_code)\n);\n\nCREATE TABLE Other_Property_Features (\n property_id number, -- example: [15, 12]\n feature_id number, -- example: [3, 4]\n property_feature_description text, -- example: ['dolorem', 'earum']\n CONSTRAINT fk_other_property_features_property_id FOREIGN KEY (property_id) REFERENCES Properties (property_id),\n CONSTRAINT fk_other_property_features_feature_id FOREIGN KEY (feature_id) REFERENCES Other_Available_Features (feature_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShow the property type descriptions of properties belonging to that code.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code", "external_knowledge": "None" }, { "question": "What are the names of properties that are either houses or apartments with more than 1 room?", "schema": "CREATE TABLE Ref_Feature_Types (\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_type_name text, -- example: ['Amenity, eg Pool.', 'Securiyt, eg Burglar Alarm.']\n PRIMARY KEY (feature_type_code)\n);\n\nCREATE TABLE Ref_Property_Types (\n property_type_code text, -- example: ['Apartment', 'House', 'Field']\n property_type_description text, -- example: ['House, Bungalow, etc.', 'Apartment, Flat, Condo, etc.']\n PRIMARY KEY (property_type_code)\n);\n\nCREATE TABLE Other_Available_Features (\n feature_id number, -- example: [2, 3]\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_name text, -- example: ['AirCon', 'Pool']\n feature_description text, -- example: ['Air Conditioning.', 'Swimming Pool.']\n PRIMARY KEY (feature_id),\n CONSTRAINT fk_other_available_features_feature_type_code FOREIGN KEY (feature_type_code) REFERENCES Ref_Feature_Types (feature_type_code)\n);\n\nCREATE TABLE Properties (\n property_id number, -- example: [1, 2]\n property_type_code text, -- example: ['Apartment', 'House', 'Other']\n date_on_market time, -- example: ['1991-06-21 23:52:10', '1990-05-25 23:01:51']\n date_sold time, -- example: ['1979-05-13 16:58:06', '1990-11-14 19:16:38']\n property_name text, -- example: ['park', 'the cole']\n property_address text, -- example: ['4745 Emerson Stravenue Suite 829\\nSouth G', '098 Tremaine Highway Suite 569\\nSouth Wil']\n room_count number, -- example: [7, 1]\n vendor_requested_price number, -- example: [372652.2909, 661536468.4429]\n buyer_offered_price number, -- example: [1.68, 8.7122]\n agreed_selling_price number, -- example: [4201.8, 21769471.8328]\n apt_feature_1 text, -- example: ['aut', 'est']\n apt_feature_2 text, -- example: ['suscipit', 'est']\n apt_feature_3 text,\n fld_feature_1 text,\n fld_feature_2 text,\n fld_feature_3 text,\n hse_feature_1 text,\n hse_feature_2 text,\n hse_feature_3 text,\n oth_feature_1 text,\n oth_feature_2 text,\n oth_feature_3 text,\n shp_feature_1 text,\n shp_feature_2 text,\n shp_feature_3 text,\n other_property_details text,\n PRIMARY KEY (property_id),\n CONSTRAINT fk_properties_property_type_code FOREIGN KEY (property_type_code) REFERENCES Ref_Property_Types (property_type_code)\n);\n\nCREATE TABLE Other_Property_Features (\n property_id number, -- example: [15, 12]\n feature_id number, -- example: [3, 4]\n property_feature_description text, -- example: ['dolorem', 'earum']\n CONSTRAINT fk_other_property_features_property_id FOREIGN KEY (property_id) REFERENCES Properties (property_id),\n CONSTRAINT fk_other_property_features_feature_id FOREIGN KEY (feature_id) REFERENCES Other_Available_Features (feature_id)\n);", "input_seq": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Ref_Feature_Types (\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_type_name text, -- example: ['Amenity, eg Pool.', 'Securiyt, eg Burglar Alarm.']\n PRIMARY KEY (feature_type_code)\n);\n\nCREATE TABLE Ref_Property_Types (\n property_type_code text, -- example: ['Apartment', 'House', 'Field']\n property_type_description text, -- example: ['House, Bungalow, etc.', 'Apartment, Flat, Condo, etc.']\n PRIMARY KEY (property_type_code)\n);\n\nCREATE TABLE Other_Available_Features (\n feature_id number, -- example: [2, 3]\n feature_type_code text, -- example: ['Amenity', 'Security']\n feature_name text, -- example: ['AirCon', 'Pool']\n feature_description text, -- example: ['Air Conditioning.', 'Swimming Pool.']\n PRIMARY KEY (feature_id),\n CONSTRAINT fk_other_available_features_feature_type_code FOREIGN KEY (feature_type_code) REFERENCES Ref_Feature_Types (feature_type_code)\n);\n\nCREATE TABLE Properties (\n property_id number, -- example: [1, 2]\n property_type_code text, -- example: ['Apartment', 'House', 'Other']\n date_on_market time, -- example: ['1991-06-21 23:52:10', '1990-05-25 23:01:51']\n date_sold time, -- example: ['1979-05-13 16:58:06', '1990-11-14 19:16:38']\n property_name text, -- example: ['park', 'the cole']\n property_address text, -- example: ['4745 Emerson Stravenue Suite 829\\nSouth G', '098 Tremaine Highway Suite 569\\nSouth Wil']\n room_count number, -- example: [7, 1]\n vendor_requested_price number, -- example: [372652.2909, 661536468.4429]\n buyer_offered_price number, -- example: [1.68, 8.7122]\n agreed_selling_price number, -- example: [4201.8, 21769471.8328]\n apt_feature_1 text, -- example: ['aut', 'est']\n apt_feature_2 text, -- example: ['suscipit', 'est']\n apt_feature_3 text,\n fld_feature_1 text,\n fld_feature_2 text,\n fld_feature_3 text,\n hse_feature_1 text,\n hse_feature_2 text,\n hse_feature_3 text,\n oth_feature_1 text,\n oth_feature_2 text,\n oth_feature_3 text,\n shp_feature_1 text,\n shp_feature_2 text,\n shp_feature_3 text,\n other_property_details text,\n PRIMARY KEY (property_id),\n CONSTRAINT fk_properties_property_type_code FOREIGN KEY (property_type_code) REFERENCES Ref_Property_Types (property_type_code)\n);\n\nCREATE TABLE Other_Property_Features (\n property_id number, -- example: [15, 12]\n feature_id number, -- example: [3, 4]\n property_feature_description text, -- example: ['dolorem', 'earum']\n CONSTRAINT fk_other_property_features_property_id FOREIGN KEY (property_id) REFERENCES Properties (property_id),\n CONSTRAINT fk_other_property_features_feature_id FOREIGN KEY (feature_id) REFERENCES Other_Available_Features (feature_id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWhat are the names of properties that are either houses or apartments with more than 1 room?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "output_seq": "SELECT property_name FROM Properties WHERE property_type_code = \"House\" UNION SELECT property_name FROM Properties WHERE property_type_code = \"Apartment\" AND room_count > 1", "external_knowledge": "None" } ]