data_source
stringclasses
1 value
prompt
listlengths
2
2
ability
stringclasses
1 value
reward_model
dict
extra_info
dict
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n release_year integer, -- example: [2007, 2006]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n PRIMARY KEY (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 refers to release_year; record ID 19 refers to game platform.id; id = 19\nIn which year did the record ID 19 with game publisher ID 6657 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T.release_year FROM game_platform AS T WHERE T.game_publisher_id = 6657 AND T.id = 19", "style": "rule" }
{ "db_id": "video_games.sqlite", "gt_sql": "SELECT T.release_year FROM game_platform AS T WHERE T.game_publisher_id = 6657 AND T.id = 19", "index": 1700, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n release_year integer, -- example: [2007, 2006]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n PRIMARY KEY (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 refers to release_year; record ID 19 refers to game platform.id; id = 19\nIn which year did the record ID 19 with game publisher ID 6657 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n game_name text, -- example: ['2 Games in 1: Sonic Advance & ChuChu Roc', '2 Games in 1: Sonic Battle & ChuChu Rock']\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n PRIMARY KEY (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 game name of the game ID 44.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T.game_name FROM game AS T WHERE T.id = 44", "style": "rule" }
{ "db_id": "video_games.sqlite", "gt_sql": "SELECT T.game_name FROM game AS T WHERE T.id = 44", "index": 1701, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n game_name text, -- example: ['2 Games in 1: Sonic Advance & ChuChu Roc', '2 Games in 1: Sonic Battle & ChuChu Rock']\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n PRIMARY KEY (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 game name of the game ID 44.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n release_year integer, -- example: [2007, 2006]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n region_name text, -- example: ['North America', 'Europe']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n platform_name text, -- example: ['Wii', 'NES']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n num_sales real, -- number sales, example: [3.5, 1.43]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n game_name text, -- example: ['2 Games in 1: Sonic Advance & ChuChu Roc', '2 Games in 1: Sonic Battle & ChuChu Rock']\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n publisher_name text, -- example: ['10TACLE Studios', '1C Company']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n genre_name text, -- example: ['Action', 'Adventure']\n PRIMARY KEY (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\ngames available refers to game_name; Wii refers to platform_name = 'Wii';\nList the games available on Wii.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T4.game_name FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id INNER JOIN game AS T4 ON T3.game_id = T4.id WHERE T1.platform_name = 'Wii'", "style": "rule" }
{ "db_id": "video_games.sqlite", "gt_sql": "SELECT T4.game_name FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id INNER JOIN game AS T4 ON T3.game_id = T4.id WHERE T1.platform_name = 'Wii'", "index": 1702, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n release_year integer, -- example: [2007, 2006]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n region_name text, -- example: ['North America', 'Europe']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n platform_name text, -- example: ['Wii', 'NES']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n num_sales real, -- number sales, example: [3.5, 1.43]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n game_name text, -- example: ['2 Games in 1: Sonic Advance & ChuChu Roc', '2 Games in 1: Sonic Battle & ChuChu Rock']\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n publisher_name text, -- example: ['10TACLE Studios', '1C Company']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n genre_name text, -- example: ['Action', 'Adventure']\n PRIMARY KEY (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\ngames available refers to game_name; Wii refers to platform_name = 'Wii';\nList the games available on Wii.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n game_name text, -- example: ['2 Games in 1: Sonic Advance & ChuChu Roc', '2 Games in 1: Sonic Battle & ChuChu Rock']\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n num_sales real, -- number sales, example: [3.5, 1.43]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n publisher_name text, -- example: ['10TACLE Studios', '1C Company']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n region_name text, -- example: ['North America', 'Europe']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n genre_name text, -- example: ['Action', 'Adventure']\n PRIMARY KEY (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\ngenre of the game refers to genre_name; game ID 119 refers to game.id = 119;\nWhat is the genre of the game ID 119?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.id = 119", "style": "rule" }
{ "db_id": "video_games.sqlite", "gt_sql": "SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.id = 119", "index": 1703, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n game_name text, -- example: ['2 Games in 1: Sonic Advance & ChuChu Roc', '2 Games in 1: Sonic Battle & ChuChu Rock']\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n num_sales real, -- number sales, example: [3.5, 1.43]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n publisher_name text, -- example: ['10TACLE Studios', '1C Company']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n region_name text, -- example: ['North America', 'Europe']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n genre_name text, -- example: ['Action', 'Adventure']\n PRIMARY KEY (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\ngenre of the game refers to genre_name; game ID 119 refers to game.id = 119;\nWhat is the genre of the game ID 119?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n release_year integer, -- example: [2007, 2006]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n genre_name text, -- example: ['Action', 'Adventure']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n platform_name text, -- example: ['Wii', 'NES']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n game_name text, -- example: ['Airline Tycoon', 'Airblade', 'Airlock', 'Airline Tycoon 2', '2 Games in 1: Sonic Advance & ChuChu Roc', '2 Games in 1: Sonic Battle & ChuChu Rock']\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\ngenre refers to genre_name; 'Airlock', 'Airline Tycoon' , and 'Airblade' refers to game_name IN ('Airlock', 'Airline Tycoon', 'Airblade');\nGive the genre of the following game titled 'Airlock' , 'Airline Tycoon' , and 'Airblade', respectively.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name IN ('Airlock', 'Airline Tycoon', 'Airblade')", "style": "rule" }
{ "db_id": "video_games.sqlite", "gt_sql": "SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name IN ('Airlock', 'Airline Tycoon', 'Airblade')", "index": 1704, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n release_year integer, -- example: [2007, 2006]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n genre_name text, -- example: ['Action', 'Adventure']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n platform_name text, -- example: ['Wii', 'NES']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n game_name text, -- example: ['Airline Tycoon', 'Airblade', 'Airlock', 'Airline Tycoon 2', '2 Games in 1: Sonic Advance & ChuChu Roc', '2 Games in 1: Sonic Battle & ChuChu Rock']\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\ngenre refers to genre_name; 'Airlock', 'Airline Tycoon' , and 'Airblade' refers to game_name IN ('Airlock', 'Airline Tycoon', 'Airblade');\nGive the genre of the following game titled 'Airlock' , 'Airline Tycoon' , and 'Airblade', respectively.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n publisher_name text, -- example: ['10TACLE Studios', '1C Company']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n num_sales real, -- number sales, example: [3.5, 1.43]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublishers refers to publisher_name; number of sales less than 10000 refers to num_sales < 0.1;\nList down at least five publishers of the games with number of sales less than 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T.publisher_name FROM ( SELECT DISTINCT T5.publisher_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN publisher AS T5 ON T4.publisher_id = T5.id WHERE T1.region_name = 'North America' AND T2.num_sales * 100000 < 10000 LIMIT 5 ) t", "style": "rule" }
{ "db_id": "video_games.sqlite", "gt_sql": "SELECT T.publisher_name FROM ( SELECT DISTINCT T5.publisher_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN publisher AS T5 ON T4.publisher_id = T5.id WHERE T1.region_name = 'North America' AND T2.num_sales * 100000 < 10000 LIMIT 5 ) t", "index": 1705, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n publisher_name text, -- example: ['10TACLE Studios', '1C Company']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n num_sales real, -- number sales, example: [3.5, 1.43]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublishers refers to publisher_name; number of sales less than 10000 refers to num_sales < 0.1;\nList down at least five publishers of the games with number of sales less than 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n game_name text, -- example: ['2 Games in 1: Sonic Advance & ChuChu Roc', '2 Games in 1: Sonic Battle & ChuChu Rock']\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n publisher_name text, -- example: ['10TACLE Studios', '1C Company']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n genre_name text, -- example: ['Action', 'Adventure']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n platform_name text, -- example: ['Wii', 'NES']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n release_year integer, -- example: [2007, 2006]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\ngenre of the game refers to genre_name; '999: Nine Hours, Nine Persons, Nine Doors' refers to game_name = '999: Nine Hours, Nine Persons, Nine Doors';\nWhat is the genre of the game titled '999: Nine Hours, Nine Persons, Nine Doors' ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '999: Nine Hours, Nine Persons, Nine Doors'", "style": "rule" }
{ "db_id": "video_games.sqlite", "gt_sql": "SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '999: Nine Hours, Nine Persons, Nine Doors'", "index": 1706, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n game_name text, -- example: ['2 Games in 1: Sonic Advance & ChuChu Roc', '2 Games in 1: Sonic Battle & ChuChu Rock']\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n publisher_name text, -- example: ['10TACLE Studios', '1C Company']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n genre_name text, -- example: ['Action', 'Adventure']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n platform_name text, -- example: ['Wii', 'NES']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n release_year integer, -- example: [2007, 2006]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\ngenre of the game refers to genre_name; '999: Nine Hours, Nine Persons, Nine Doors' refers to game_name = '999: Nine Hours, Nine Persons, Nine Doors';\nWhat is the genre of the game titled '999: Nine Hours, Nine Persons, Nine Doors' ?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n region_name text, -- example: ['North America', 'Europe']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n platform_name text, -- example: ['Wii', 'NES']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n genre_name text, -- example: ['Action', 'Adventure']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n release_year integer, -- example: [2007, 2006]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (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 the game was released refers to release_year;\nWhen was the game ID 156 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.release_year FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id WHERE T2.game_id = 156", "style": "rule" }
{ "db_id": "video_games.sqlite", "gt_sql": "SELECT T1.release_year FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id WHERE T2.game_id = 156", "index": 1707, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n region_name text, -- example: ['North America', 'Europe']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n platform_name text, -- example: ['Wii', 'NES']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n genre_name text, -- example: ['Action', 'Adventure']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n release_year integer, -- example: [2007, 2006]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (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 the game was released refers to release_year;\nWhen was the game ID 156 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n platform_name text, -- example: ['Wii', 'NES']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n num_sales real, -- number sales, example: [3.5, 1.43]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n release_year integer, -- example: [2007, 2006]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n game_name text, -- example: ['2 Games in 1: Sonic Advance & ChuChu Roc', '2 Games in 1: Sonic Battle & ChuChu Rock']\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n region_name text, -- example: ['North America', 'Europe']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n publisher_name text, -- example: ['10TACLE Studios', '1C Company']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWii refers to platform_name = 'Wii'; percentage = MULTIPLY(DIVIDE(SUM(release_year = 2007), COUNT(release_year)), 100.0); released in 2007 refers to release_year = 2007;\nIn games that can be played on Wii, what is the percentage of games released in 2007?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT CAST(COUNT(CASE WHEN T2.release_year = 2007 THEN T3.game_id ELSE NULL END) AS REAL) * 100 / COUNT(T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T1.platform_name = 'Wii'", "style": "rule" }
{ "db_id": "video_games.sqlite", "gt_sql": "SELECT CAST(COUNT(CASE WHEN T2.release_year = 2007 THEN T3.game_id ELSE NULL END) AS REAL) * 100 / COUNT(T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T1.platform_name = 'Wii'", "index": 1708, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE platform (\n id integer, -- example: [1, 2]\n platform_name text, -- example: ['Wii', 'NES']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE region_sales (\n region_id integer, -- example: [1, 2]\n game_platform_id integer, -- example: [50, 51]\n num_sales real, -- number sales, example: [3.5, 1.43]\n CONSTRAINT fk_region_sales_region_id FOREIGN KEY (region_id) REFERENCES region (id),\n CONSTRAINT fk_region_sales_game_platform_id FOREIGN KEY (game_platform_id) REFERENCES game_platform (id)\n);\n\nCREATE TABLE game_publisher (\n id integer, -- example: [1, 2]\n game_id integer, -- example: [10866, 9244]\n publisher_id integer, -- example: [369, 328]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_publisher_game_id FOREIGN KEY (game_id) REFERENCES game (id),\n CONSTRAINT fk_game_publisher_publisher_id FOREIGN KEY (publisher_id) REFERENCES publisher (id)\n);\n\nCREATE TABLE game_platform (\n id integer, -- example: [1, 2]\n game_publisher_id integer, -- example: [8564, 9852]\n platform_id integer, -- example: [4, 7]\n release_year integer, -- example: [2007, 2006]\n PRIMARY KEY (id),\n CONSTRAINT fk_game_platform_game_publisher_id FOREIGN KEY (game_publisher_id) REFERENCES game_publisher (id),\n CONSTRAINT fk_game_platform_platform_id FOREIGN KEY (platform_id) REFERENCES platform (id)\n);\n\nCREATE TABLE game (\n id integer, -- example: [44, 45]\n genre_id integer, -- example: [4, 5]\n game_name text, -- example: ['2 Games in 1: Sonic Advance & ChuChu Roc', '2 Games in 1: Sonic Battle & ChuChu Rock']\n PRIMARY KEY (id),\n CONSTRAINT fk_game_genre_id FOREIGN KEY (genre_id) REFERENCES genre (id)\n);\n\nCREATE TABLE region (\n id integer, -- example: [1, 2]\n region_name text, -- example: ['North America', 'Europe']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE publisher (\n id integer, -- example: [1, 2]\n publisher_name text, -- example: ['10TACLE Studios', '1C Company']\n PRIMARY KEY (id)\n);\n\nCREATE TABLE genre (\n id integer, -- example: [1, 2]\n PRIMARY KEY (id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nWii refers to platform_name = 'Wii'; percentage = MULTIPLY(DIVIDE(SUM(release_year = 2007), COUNT(release_year)), 100.0); released in 2007 refers to release_year = 2007;\nIn games that can be played on Wii, what is the percentage of games released in 2007?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Concepts in Magnetic Resonance Part A', 'Concepts in Magnetic Resonance', 'Resonance', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\njournal \"Concepts in Magnetic Resonance Part A\" refers to FullName = 'Concepts in Magnetic Resonance Part A'\nHow many papers were published in the journal \"Concepts in Magnetic Resonance Part A\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(T2.Id) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'Concepts in Magnetic Resonance Part A'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(T2.Id) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'Concepts in Magnetic Resonance Part A'", "index": 1709, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Concepts in Magnetic Resonance Part A', 'Concepts in Magnetic Resonance', 'Resonance', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\njournal \"Concepts in Magnetic Resonance Part A\" refers to FullName = 'Concepts in Magnetic Resonance Part A'\nHow many papers were published in the journal \"Concepts in Magnetic Resonance Part A\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Area Effects in Cepaea', 'Title of Paper', 'The title', 'Authors', 'Author', 'Effect']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Area Effects in Cepaea\" is the title of paper\nPlease list the names of the authors of the paper \"Area Effects in Cepaea\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Name FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title = 'Area Effects in Cepaea'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Name FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title = 'Area Effects in Cepaea'", "index": 1710, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Area Effects in Cepaea', 'Title of Paper', 'The title', 'Authors', 'Author', 'Effect']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Area Effects in Cepaea\" is the title of paper\nPlease list the names of the authors of the paper \"Area Effects in Cepaea\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Authors', 'Titles', 'Author', 'Title', 'TITLE']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Name Of Author', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Klaus ZIMMERMANN', 'Klaus Zimmermann', 'A Zimmermann', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Klaus Zimmermann\" is the name of author\nPlease list the titles of the paper whose authors include Klaus Zimmermann.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Name = 'Klaus Zimmermann'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Name = 'Klaus Zimmermann'", "index": 1711, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Authors', 'Titles', 'Author', 'Title', 'TITLE']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Name Of Author', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Klaus ZIMMERMANN', 'Klaus Zimmermann', 'A Zimmermann', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Klaus Zimmermann\" is the name of author\nPlease list the titles of the paper whose authors include Klaus Zimmermann.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Thomas Wiegand', 'U Wiegand', 'A Thomas', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Name Of Author', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Author', 'Title', 'TITLE', 'Name', 'NAME']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished in 1995 refers to Year = 1995; 'Thomas Wiegand' is the name of author\nWhat is the title of the paper published in 1995 and whose author included Thomas Wiegand?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Name = 'Thomas Wiegand' AND T2.Year = 1995", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Name = 'Thomas Wiegand' AND T2.Year = 1995", "index": 1712, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Thomas Wiegand', 'U Wiegand', 'A Thomas', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Name Of Author', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Author', 'Title', 'TITLE', 'Name', 'NAME']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished in 1995 refers to Year = 1995; 'Thomas Wiegand' is the name of author\nWhat is the title of the paper published in 1995 and whose author included Thomas Wiegand?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Molecular Bi', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Molecular Brain', 'Cases Journal', 'Brain', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'CASE', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Brain', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Cases Journal\" and \"Molecular Brain\" are FullName of journal; more paper in percentage = Subtract(Count(Id(FullName = 'Cases Journal')), Count(Id(FullName = 'Molecular Brain')))/ Count(Id(FullNmae = 'Molecular Brain')) * 100\nHow many more papers in total were published in the journal \"Cases Journal\" than in the journal \"Molecular Brain\" in percentage?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT SUM(CASE WHEN T1.FullName = 'Cases Journal' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.FullName = 'Molecular Brain' THEN 1 ELSE 0 END) AS DIFF FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT SUM(CASE WHEN T1.FullName = 'Cases Journal' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.FullName = 'Molecular Brain' THEN 1 ELSE 0 END) AS DIFF FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId", "index": 1713, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Molecular Bi', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Molecular Brain', 'Cases Journal', 'Brain', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'CASE', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Brain', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Cases Journal\" and \"Molecular Brain\" are FullName of journal; more paper in percentage = Subtract(Count(Id(FullName = 'Cases Journal')), Count(Id(FullName = 'Molecular Brain')))/ Count(Id(FullNmae = 'Molecular Brain')) * 100\nHow many more papers in total were published in the journal \"Cases Journal\" than in the journal \"Molecular Brain\" in percentage?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['HAVE', 'ITS', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Name', 'NAME', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nword computing refers to FullName LIKE '%computing%'\nHow many journals have a word \"computing\" in its 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(Id) FROM Journal WHERE FullName LIKE '%computing%'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(Id) FROM Journal WHERE FullName LIKE '%computing%'", "index": 1714, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['HAVE', 'ITS', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Name', 'NAME', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nword computing refers to FullName LIKE '%computing%'\nHow many journals have a word \"computing\" in its 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Journal', 'Title', 'TITLE', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nlatest published paper refers to Max(Year)\nWhat is the title and journal homepage of the latest published paper?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Title, T2.HomePage FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id ORDER BY T1.Year DESC LIMIT 1", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Title, T2.HomePage FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id ORDER BY T1.Year DESC LIMIT 1", "index": 1715, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Journal', 'Title', 'TITLE', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nlatest published paper refers to Max(Year)\nWhat is the title and journal homepage of the latest published paper?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Conferences', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nId of 187 refers to ConferenceId = 187; during 1990 to 2000 refers to Year BETWEEN 1990 and 2000; total number of conference refers to Count(ConferenceId = 187)\nWhat is the total number and conference's homepage of papers held in a conference with an ID of 187 during 1990 to 2000?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(T2.ConferenceId), T1.HomePage FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T2.Year BETWEEN 1990 AND 2000 AND T2.ConferenceId = 187", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(T2.ConferenceId), T1.HomePage FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T2.Year BETWEEN 1990 AND 2000 AND T2.ConferenceId = 187", "index": 1716, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Conferences', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nId of 187 refers to ConferenceId = 187; during 1990 to 2000 refers to Year BETWEEN 1990 and 2000; total number of conference refers to Count(ConferenceId = 187)\nWhat is the total number and conference's homepage of papers held in a conference with an ID of 187 during 1990 to 2000?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Affiliation text, -- example: ['The University of Electro-Communications', 'University of Electro-Communications', 'School of Information Systems', 'School of Information', 'Graduate School', 'Kyushu University 812 Fukuoka Japan 812 ']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Information Systems', 'Organization', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Affiliation text, -- example: ['The University of Electro-Communications', 'University of Electro-Communications', 'Graduate School of Information', 'School of Information', 'Department of', 'Department']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Information Systems', 'The title', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['information systems', 'INFORMATION', 'information', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished in 2003 refers to Year = 2003; 'Department of Network Science, Graduate School of Information Systems, The University of Electro-Communications' is the Affiliation organization\nWhat is the title of the paper published in 2003 by an author with affiliation with Department of Network Science, Graduate School of Information Systems, The University of Electro-Communications?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT DISTINCT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Affiliation = 'Department of Network Science, Graduate School of Information Systems, The University of Electro-Communications' AND T2.Year = 2003", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT DISTINCT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Affiliation = 'Department of Network Science, Graduate School of Information Systems, The University of Electro-Communications' AND T2.Year = 2003", "index": 1717, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Affiliation text, -- example: ['The University of Electro-Communications', 'University of Electro-Communications', 'School of Information Systems', 'School of Information', 'Graduate School', 'Kyushu University 812 Fukuoka Japan 812 ']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Information Systems', 'Organization', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Affiliation text, -- example: ['The University of Electro-Communications', 'University of Electro-Communications', 'Graduate School of Information', 'School of Information', 'Department of', 'Department']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Information Systems', 'The title', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['information systems', 'INFORMATION', 'information', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished in 2003 refers to Year = 2003; 'Department of Network Science, Graduate School of Information Systems, The University of Electro-Communications' is the Affiliation organization\nWhat is the title of the paper published in 2003 by an author with affiliation with Department of Network Science, Graduate School of Information Systems, The University of Electro-Communications?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ITS', 'IADIS', 'IADT']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Authors', 'Journal', 'Author', 'Title', 'TITLE', 'Name']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nwith \"chemiluminescence\" in its title refers to Title LIKE 'chemiluminescence%'; journal ID from 245 to 250 refers to JournalId BETWEEN 245 AND 250\nList the authors and journal short name of the papers with \"chemiluminescence\" in its title and has a journal ID from 245 to 250.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Name, T3.ShortName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T1.JournalId BETWEEN 245 AND 250 AND T1.Title LIKE '%chemiluminescence%'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Name, T3.ShortName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T1.JournalId BETWEEN 245 AND 250 AND T1.Title LIKE '%chemiluminescence%'", "index": 1718, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ITS', 'IADIS', 'IADT']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Authors', 'Journal', 'Author', 'Title', 'TITLE', 'Name']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nwith \"chemiluminescence\" in its title refers to Title LIKE 'chemiluminescence%'; journal ID from 245 to 250 refers to JournalId BETWEEN 245 AND 250\nList the authors and journal short name of the papers with \"chemiluminescence\" in its title and has a journal ID from 245 to 250.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Author', 'Title', 'TITLE', 'No Title', 'Authors']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ITS', 'IADIS', 'IADT']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nin 2000 to 2005 refers to Year BETWEEN 2000 AND 2005; a word \"social\" in its title refers to Title = '%SOCIAL%'\nWhat are the journal homepages and author ID of the papers published in 2000 to 2005 with a word \"social\" 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T3.HomePage, T2.AuthorId FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T1.Year BETWEEN 2000 AND 2005 AND T1.Title LIKE '%SOCIAL%'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T3.HomePage, T2.AuthorId FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T1.Year BETWEEN 2000 AND 2005 AND T1.Title LIKE '%SOCIAL%'", "index": 1719, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Author', 'Title', 'TITLE', 'No Title', 'Authors']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ITS', 'IADIS', 'IADT']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nin 2000 to 2005 refers to Year BETWEEN 2000 AND 2005; a word \"social\" in its title refers to Title = '%SOCIAL%'\nWhat are the journal homepages and author ID of the papers published in 2000 to 2005 with a word \"social\" 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ITS', 'IDS', 'IADIS', 'IADT']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Name', 'NAME', 'Conferences', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\njournal ID of 200 to 300 refers to JournalId BETWEEN 200 AND 300; short name starts with A refers to ShortName LIKE 'A%'; Percentage = Divide (Count(ConferenceId = 0), Count(ConferenceId)) * 100\nIn papers with journal IDs from 200 to 300 and with its short name starts with A, what is the percentage of papers with conference ID of 0?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT CAST(SUM(CASE WHEN T1.ConferenceId = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.ConferenceId) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.JournalId BETWEEN 200 AND 300 AND T2.ShortName LIKE 'A%'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT CAST(SUM(CASE WHEN T1.ConferenceId = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.ConferenceId) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.JournalId BETWEEN 200 AND 300 AND T2.ShortName LIKE 'A%'", "index": 1720, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ITS', 'IDS', 'IADIS', 'IADT']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Name', 'NAME', 'Conferences', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\njournal ID of 200 to 300 refers to JournalId BETWEEN 200 AND 300; short name starts with A refers to ShortName LIKE 'A%'; Percentage = Divide (Count(ConferenceId = 0), Count(ConferenceId)) * 100\nIn papers with journal IDs from 200 to 300 and with its short name starts with A, what is the percentage of papers with conference ID of 0?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nyear of 2001 to 2010 refers to Year BETWEEN 2001 AND 2010; Percentage = Divide(Count (PaperId(Year = 2001)), Count (PaperID(Year BETWEEN 2001 AND 2010))) * 100\nWithin the year of 2001 to 2010, find the paper published rate of 2001.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT CAST(SUM(CASE WHEN Year = 2001 THEN 1 ELSE 0 END) AS REAL) / COUNT(Id) FROM Paper WHERE Year >= 2001 AND Year < 2011", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT CAST(SUM(CASE WHEN Year = 2001 THEN 1 ELSE 0 END) AS REAL) / COUNT(Id) FROM Paper WHERE Year >= 2001 AND Year < 2011", "index": 1721, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nyear of 2001 to 2010 refers to Year BETWEEN 2001 AND 2010; Percentage = Divide(Count (PaperId(Year = 2001)), Count (PaperID(Year BETWEEN 2001 AND 2010))) * 100\nWithin the year of 2001 to 2010, find the paper published rate of 2001.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Address', 'Name', 'NAME', 'Conferences', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICWE', 'ICW', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"ICWE\" is the ShortName of conference\nWrite down the conference full name of \"ICWE\" and it's homepage address.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT FullName, Homepage FROM Conference WHERE ShortName = 'ICWE'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT FullName, Homepage FROM Conference WHERE ShortName = 'ICWE'", "index": 1722, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Address', 'Name', 'NAME', 'Conferences', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICWE', 'ICW', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"ICWE\" is the ShortName of conference\nWrite down the conference full name of \"ICWE\" and it's homepage address.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Institute', 'INSTITUT', 'Massachusetts Institute of Technology', 'Massachusetts institute of technology', 'Massachusetts Institute of Technologv', 'No Affiliation']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Institute', 'INSTITUTE', 'Institut', 'Massachusetts Institute of Technology', 'MASSACHUSETTS INSTITUTE OF TECHNOLOGY', 'Cavendish Laboratory|Cambridge Universit']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Organizations', 'Massachusetts Institute of Technology', 'Authors', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['which', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Organization', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Standford University\" and \"Massachusetts Institute of Technolgy\" are affiliation organization; affiliated with more author refers to Max(Count(Id))\nBetween \"Standford University\" and \"Massachusetts Institute of Technolgy\", which organization had affiliated with more author.?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT Affiliation FROM Author WHERE Affiliation IN ('Stanford University', 'Massachusetts Institute of Technology') GROUP BY Affiliation ORDER BY COUNT(Id) DESC LIMIT 1", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT Affiliation FROM Author WHERE Affiliation IN ('Stanford University', 'Massachusetts Institute of Technology') GROUP BY Affiliation ORDER BY COUNT(Id) DESC LIMIT 1", "index": 1723, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Institute', 'INSTITUT', 'Massachusetts Institute of Technology', 'Massachusetts institute of technology', 'Massachusetts Institute of Technologv', 'No Affiliation']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Institute', 'INSTITUTE', 'Institut', 'Massachusetts Institute of Technology', 'MASSACHUSETTS INSTITUTE OF TECHNOLOGY', 'Cavendish Laboratory|Cambridge Universit']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Organizations', 'Massachusetts Institute of Technology', 'Authors', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['which', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Organization', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Standford University\" and \"Massachusetts Institute of Technolgy\" are affiliation organization; affiliated with more author refers to Max(Count(Id))\nBetween \"Standford University\" and \"Massachusetts Institute of Technolgy\", which organization had affiliated with more author.?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'null', 'Authors', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['NULL', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Affiliation text, -- example: ['null', 'No Affiliation', 'No affiliation', 'No Affiliations', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['NULL', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nwith affiliation refers to Affiliation is not Null; without affiliation refers to Affiliation IS NULL; Ration = Count(Id(Affiliation is NOT NULL)) : Count (Id (Affiliation IS NULL))\nWhat is the ratio of author with affiliation and without affiliation?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT CAST(SUM(CASE WHEN Affiliation IS NULL THEN 1 ELSE 0 END) AS REAL) / COUNT(*) FROM Author", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT CAST(SUM(CASE WHEN Affiliation IS NULL THEN 1 ELSE 0 END) AS REAL) / COUNT(*) FROM Author", "index": 1724, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'null', 'Authors', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['NULL', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Affiliation text, -- example: ['null', 'No Affiliation', 'No affiliation', 'No Affiliations', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['NULL', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nwith affiliation refers to Affiliation is not Null; without affiliation refers to Affiliation IS NULL; Ration = Count(Id(Affiliation is NOT NULL)) : Count (Id (Affiliation IS NULL))\nWhat is the ratio of author with affiliation and without affiliation?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Organization', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['University of Oulu', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IDS', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Name', 'NAME', 'Organizations', 'Authors', 'Stitching videos streamed by mobile phon']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['University of Oulu', 'No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"University of Oulu\" is the Affiliation Organization\nWrite down the author's name and IDs who are affiliated with Univeristiy of Oulu.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT Name, id FROM Author WHERE Affiliation = 'University of Oulu'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT Name, id FROM Author WHERE Affiliation = 'University of Oulu'", "index": 1725, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Organization', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['University of Oulu', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IDS', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Name', 'NAME', 'Organizations', 'Authors', 'Stitching videos streamed by mobile phon']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['University of Oulu', 'No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"University of Oulu\" is the Affiliation Organization\nWrite down the author's name and IDs who are affiliated with Univeristiy of Oulu.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['The Most', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Author', 'Title', 'TITLE', 'Name', 'NAME']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nmost number in author refers to Max (Count(PaperId))\nFind the paper ID, title, published year and journal's full name of the paper which included the most number in author.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Id, T1.Title, T1.Year, T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id GROUP BY T2.AuthorId ORDER BY COUNT(T2.AuthorId) DESC LIMIT 1", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Id, T1.Title, T1.Year, T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id GROUP BY T2.AuthorId ORDER BY COUNT(T2.AuthorId) DESC LIMIT 1", "index": 1726, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['The Most', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Author', 'Title', 'TITLE', 'Name', 'NAME']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nmost number in author refers to Max (Count(PaperId))\nFind the paper ID, title, published year and journal's full name of the paper which included the most number in author.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Title', 'TITLE', 'Name', 'NAME', 'Conferences']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['S Short', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Author Name', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper ID of 15 refers to PaperId = 15\nDescribe the paper title, published year, conference's short name and included author names in the paper ID of 15.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT DISTINCT T1.Title, T1.Year, T3.ShortName, T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id WHERE T1.Id = 15", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT DISTINCT T1.Title, T1.Year, T3.ShortName, T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id WHERE T1.Id = 15", "index": 1727, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Title', 'TITLE', 'Name', 'NAME', 'Conferences']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['S Short', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Author Name', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper ID of 15 refers to PaperId = 15\nDescribe the paper title, published year, conference's short name and included author names in the paper ID of 15.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Memory', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Physical examination', 'Title of Paper', 'The title', 'Author', 'Memory', 'Title']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['architecture', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Microsoft Research, USA', 'No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Author Name', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Microsoft Research', 'Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Inspection resistant memory: Architectural support for security from physical examination\" is the title of paper;  'Microsoft Research, USA' is the Affiliation\nAmong the author included in the paper of \"Inspection resistant memory: Architectural support for security from physical examination\", write down the author name and ID who were affiliated with Microsoft Research, 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Name, T1.Id FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Inspection resistant memory: Architectural support for security FROM physical examination' AND T2.Affiliation = 'Microsoft Research, USA'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Name, T1.Id FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Inspection resistant memory: Architectural support for security FROM physical examination' AND T2.Affiliation = 'Microsoft Research, USA'", "index": 1728, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Memory', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Physical examination', 'Title of Paper', 'The title', 'Author', 'Memory', 'Title']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['architecture', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Microsoft Research, USA', 'No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Author Name', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Microsoft Research', 'Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Inspection resistant memory: Architectural support for security from physical examination\" is the title of paper;  'Microsoft Research, USA' is the Affiliation\nAmong the author included in the paper of \"Inspection resistant memory: Architectural support for security from physical examination\", write down the author name and ID who were affiliated with Microsoft Research, 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Author Name', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'The title', 'Author', 'Title', 'TITLE', 'Name']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['regulation', 'Regulation', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Decreased Saliva Secretion and Down-Regulation of AQP5 in Submandibular Gland in Irradiated Rats\" is the Title of paper\nWrite down the author name, affiliation, jounal short name and full name of the paper \"Decreased Saliva Secretion and Down-Regulation of AQP5 in Submandibular Gland in Irradiated Rats\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Name, T2.Affiliation, T3.ShortName, T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T1.Title = 'Decreased Saliva Secretion and Down-Regulation of AQP5 in Submandibular Gland in Irradiated Rats'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Name, T2.Affiliation, T3.ShortName, T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T1.Title = 'Decreased Saliva Secretion and Down-Regulation of AQP5 in Submandibular Gland in Irradiated Rats'", "index": 1729, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Author Name', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'The title', 'Author', 'Title', 'TITLE', 'Name']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['regulation', 'Regulation', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Decreased Saliva Secretion and Down-Regulation of AQP5 in Submandibular Gland in Irradiated Rats\" is the Title of paper\nWrite down the author name, affiliation, jounal short name and full name of the paper \"Decreased Saliva Secretion and Down-Regulation of AQP5 in Submandibular Gland in Irradiated Rats\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['DIFFERENCES', 'IWC', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Name', 'NAME', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"IWC\" is the ShortName of journal;  '2000' and '2010' are Year;  Difference = Subtract(Count(Paper.Id(Year = 2000)), Count(Paper.Id(Year = 2010)))\nCalculate the differences of the paper number with the journal name of IWC in 2000 and 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT SUM(CASE WHEN T2.Year = 2000 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.Year = 2010 THEN 1 ELSE 0 END) AS DIFF FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.ShortName = 'IWC'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT SUM(CASE WHEN T2.Year = 2000 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.Year = 2010 THEN 1 ELSE 0 END) AS DIFF FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.ShortName = 'IWC'", "index": 1730, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['DIFFERENCES', 'IWC', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Name', 'NAME', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"IWC\" is the ShortName of journal;  '2000' and '2010' are Year;  Difference = Subtract(Count(Paper.Id(Year = 2000)), Count(Paper.Id(Year = 2010)))\nCalculate the differences of the paper number with the journal name of IWC in 2000 and 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npreprinted or not published refers to Year = 0\nHow many of the papers are preprinted or not published?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(Id) FROM Paper WHERE Year = 0", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(Id) FROM Paper WHERE Year = 0", "index": 1731, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npreprinted or not published refers to Year = 0\nHow many of the papers are preprinted or not published?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'The title', 'Title', 'TITLE', 'Name', 'NAME']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Representation', 'Representations', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"The Dissimilarity Representation as a Tool for Three-Way Data Classification: A 2D Measure\" is the Title of paper\nState the full name of conference for paper \"The Dissimilarity Representation as a Tool for Three-Way Data Classification: A 2D Measure\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.FullName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'The Dissimilarity Representation as a Tool for Three-Way Data Classification: A 2D Measure'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.FullName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'The Dissimilarity Representation as a Tool for Three-Way Data Classification: A 2D Measure'", "index": 1732, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'The title', 'Title', 'TITLE', 'Name', 'NAME']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Representation', 'Representations', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"The Dissimilarity Representation as a Tool for Three-Way Data Classification: A 2D Measure\" is the Title of paper\nState the full name of conference for paper \"The Dissimilarity Representation as a Tool for Three-Way Data Classification: A 2D Measure\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'The title', 'Address', 'Title', 'TITLE', 'Stitching videos streamed by mobile phon']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Energy-efficiency bounds for noise-tolerant dynamic circuits\" is the Title of paper\nWhat is the homepage address for paper \"Energy-efficiency bounds for noise-tolerant dynamic circuits\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Energy-efficiency bounds for noise-tolerant dynamic circuits'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Energy-efficiency bounds for noise-tolerant dynamic circuits'", "index": 1733, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'The title', 'Address', 'Title', 'TITLE', 'Stitching videos streamed by mobile phon']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n\"Energy-efficiency bounds for noise-tolerant dynamic circuits\" is the Title of paper\nWhat is the homepage address for paper \"Energy-efficiency bounds for noise-tolerant dynamic circuits\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Name Of Author', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper with ID from 101 to 105 refers to Id BETWEEN 100 AND 106\nWrite down the name of authors for paper with id from 101 to 105.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Id > 100 AND T1.Id < 106", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Id > 100 AND T1.Id < 106", "index": 1734, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Name Of Author', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper with ID from 101 to 105 refers to Id BETWEEN 100 AND 106\nWrite down the name of authors for paper with id from 101 to 105.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['S Short', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished in 2009 refers to Year = 2009\nAmong the papers published in 2009, pick 10 and list down the conference's short name of these papers.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.PaperId, T4.ShortName FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId INNER JOIN Paper AS T3 ON T2.PaperId = T3.Id INNER JOIN Conference AS T4 ON T3.ConferenceId = T4.Id WHERE T3.Year = 2009 LIMIT 10", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.PaperId, T4.ShortName FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId INNER JOIN Paper AS T3 ON T2.PaperId = T3.Id INNER JOIN Conference AS T4 ON T3.ConferenceId = T4.Id WHERE T3.Year = 2009 LIMIT 10", "index": 1735, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['S Short', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished in 2009 refers to Year = 2009\nAmong the papers published in 2009, pick 10 and list down the conference's short name of these papers.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Results', 'Title', 'TITLE', 'Transplantation: ', 'No Title']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Transplantation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Transplantation', 'Lung', 'Primates', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper \"364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results\" refers to Title = '364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results'\nWrite down homepage URL of journal for paper \"364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Title = '364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Title = '364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results'", "index": 1736, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Results', 'Title', 'TITLE', 'Transplantation: ', 'No Title']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Transplantation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Transplantation', 'Lung', 'Primates', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper \"364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results\" refers to Title = '364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results'\nWrite down homepage URL of journal for paper \"364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['International Conference On', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['INTERNET', 'WeRE', 'IADIS', 'IADT']\n FullName text, -- example: ['International Conference on', 'International Conference on NLP', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['International Conference', 'Conference on ', 'Internet', 'Title', 'TITLE', 'Name']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['INTERNET', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nconference \"International Conference on Internet Computing\" refers to FullName = 'International Conference on Internet Computing'; paper name refers to Title\nList down all paper name that were published in conference \"International Conference on Internet Computing\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Title FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Conference on Internet Computing' AND T1.Title <> ''", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Title FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Conference on Internet Computing' AND T1.Title <> ''", "index": 1737, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['International Conference On', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['INTERNET', 'WeRE', 'IADIS', 'IADT']\n FullName text, -- example: ['International Conference on', 'International Conference on NLP', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['International Conference', 'Conference on ', 'Internet', 'Title', 'TITLE', 'Name']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['INTERNET', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nconference \"International Conference on Internet Computing\" refers to FullName = 'International Conference on Internet Computing'; paper name refers to Title\nList down all paper name that were published in conference \"International Conference on Internet Computing\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Author Name', 'Key Words', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Name', 'NAME', 'haplotypes', 'Authors', '- 2005 ']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['Key Words :', 'Key words:', 'Key Words:', 'Key words.', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nin 2005 refers to Year = '2005'; key words of \"LOAD; IDE; SNP; haplotype; asso- ciation studies\" refers to Keyword = 'LOAD; IDE; SNP; haplotype; asso- ciation studies'\nAmong papers that were published in 2005, provide the author name of paper with key words of \"LOAD; IDE; SNP; haplotype; asso- ciation studies\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Year = 2005 AND T1.Keyword = 'KEY WORDS: LOAD IDE SNP haplotype asso- ciation studies'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Year = 2005 AND T1.Keyword = 'KEY WORDS: LOAD IDE SNP haplotype asso- ciation studies'", "index": 1738, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Author Name', 'Key Words', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Name', 'NAME', 'haplotypes', 'Authors', '- 2005 ']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['Key Words :', 'Key words:', 'Key Words:', 'Key words.', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nin 2005 refers to Year = '2005'; key words of \"LOAD; IDE; SNP; haplotype; asso- ciation studies\" refers to Keyword = 'LOAD; IDE; SNP; haplotype; asso- ciation studies'\nAmong papers that were published in 2005, provide the author name of paper with key words of \"LOAD; IDE; SNP; haplotype; asso- ciation studies\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Name Of Author', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['JEI', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'The title', 'Authors', 'Author', 'Title', 'TITLE']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Jei Keon Chae', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Jei Keon Chee' is the name of author;\nWho are the co-authors for Jei Keon Chae and what is the title of paper written by 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.AuthorId, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Jei Keon Chae'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.AuthorId, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Jei Keon Chae'", "index": 1739, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Name Of Author', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['JEI', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'The title', 'Authors', 'Author', 'Title', 'TITLE']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Jei Keon Chae', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Jei Keon Chee' is the name of author;\nWho are the co-authors for Jei Keon Chae and what is the title of paper written by 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Journal', 'Authors', 'Author', 'Title', 'TITLE']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Name Of Author', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Shueh-Lin Yau', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShueh-Lin Yau is the name of author;\nWhat are the conference name and journal name of paper written by Shueh-Lin Yau? List down the name of co-authors and provide the title of that paper.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.ConferenceId, T1.JournalId, T2.Name, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id INNER JOIN Journal AS T4 ON T1.JournalId = T4.Id WHERE T2.Name = 'Shueh-Lin Yau'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.ConferenceId, T1.JournalId, T2.Name, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id INNER JOIN Journal AS T4 ON T1.JournalId = T4.Id WHERE T2.Name = 'Shueh-Lin Yau'", "index": 1740, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Journal', 'Authors', 'Author', 'Title', 'TITLE']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Name Of Author', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Shueh-Lin Yau', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nShueh-Lin Yau is the name of author;\nWhat are the conference name and journal name of paper written by Shueh-Lin Yau? List down the name of co-authors and provide the title of that paper.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Standard', 'Journal', 'Author', 'Title', 'TITLE', 'Standards']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['Higgs boson', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Affiliation text, -- example: ['Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\njournal 'A combined search for the standard model Higgs boson at s = 1.96 Â TeV' refers to Title = 'A combined search for the standard model Higgs boson at s = 1.96 Â TeV'\nWhat is the affiliation of the author writing in the journal 'A combined search for the standard model Higgs boson at s = 1.96 Â TeV'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Affiliation FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title = 'A combined search for the standard model Higgs boson at s = 1.96 Â TeV'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Affiliation FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title = 'A combined search for the standard model Higgs boson at s = 1.96 Â TeV'", "index": 1741, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Standard', 'Journal', 'Author', 'Title', 'TITLE', 'Standards']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['Higgs boson', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Affiliation text, -- example: ['Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\njournal 'A combined search for the standard model Higgs boson at s = 1.96 Â TeV' refers to Title = 'A combined search for the standard model Higgs boson at s = 1.96 Â TeV'\nWhat is the affiliation of the author writing in the journal 'A combined search for the standard model Higgs boson at s = 1.96 Â TeV'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Transition', 'transition', 'Authors', 'Author', 'Title', 'TITLE']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['S ATLAS', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper titled 'Particle identification using the time-over-threshold method in the ATLAS Transition Radiation Tracker' refers to Title = 'Particle identification using the time-over-threshold method in the ATLAS Transition Radiation Tracker'\nWhat is the name of the co-authors of the paper titled 'Particle identification using the time-over-threshold method in the ATLAS Transition Radiation Tracker'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Name FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title = 'Particle identification using the time-over-threshold method in the ATLAS Transition Radiation Tracker'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Name FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title = 'Particle identification using the time-over-threshold method in the ATLAS Transition Radiation Tracker'", "index": 1742, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Transition', 'transition', 'Authors', 'Author', 'Title', 'TITLE']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['S ATLAS', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper titled 'Particle identification using the time-over-threshold method in the ATLAS Transition Radiation Tracker' refers to Title = 'Particle identification using the time-over-threshold method in the ATLAS Transition Radiation Tracker'\nWhat is the name of the co-authors of the paper titled 'Particle identification using the time-over-threshold method in the ATLAS Transition Radiation Tracker'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Affiliation text, -- example: ['No Affiliation', 'No affiliation', 'No Affiliations', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Authors', 'Author', 'Title', 'TITLE', 'No Title', 'Stitching videos streamed by mobile phon']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nabout Charged particle multiplicity refers to Title which contains 'Charged particle multiplicity'; affiliated with INFN refers to Affiliation LIKE '%INFN%' ; percentage refers to DIVIDE(COUNT(Affiliation LIKE '%INFN%' ), COUNT(AuthorId)) * 100%\nWhat percentage of authors of the paper about Charged particle multiplicity are affiliated with INFN?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT CAST((SUM(CASE WHEN T1.Affiliation LIKE '%INFN%' THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(T2.Id) FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title LIKE '%Charged particle multiplicity%'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT CAST((SUM(CASE WHEN T1.Affiliation LIKE '%INFN%' THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(T2.Id) FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title LIKE '%Charged particle multiplicity%'", "index": 1743, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Affiliation text, -- example: ['No Affiliation', 'No affiliation', 'No Affiliations', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Authors', 'Author', 'Title', 'TITLE', 'No Title', 'Stitching videos streamed by mobile phon']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nabout Charged particle multiplicity refers to Title which contains 'Charged particle multiplicity'; affiliated with INFN refers to Affiliation LIKE '%INFN%' ; percentage refers to DIVIDE(COUNT(Affiliation LIKE '%INFN%' ), COUNT(AuthorId)) * 100%\nWhat percentage of authors of the paper about Charged particle multiplicity are affiliated with INFN?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Cancers', 'Cancer', 'Gene', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Colorectal cancer', 'Authors', 'Author', 'Title', 'TITLE', 'Name']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper \"Hypermethylation of the <I>TPEF/HPP1</I> Gene in Primary and Metastatic Colorectal Cancers\" refers to Title = 'Hypermethylation of the <I>TPEF/HPP1</I> Gene in Primary and Metastatic Colorectal Cancers'\nPlease list the names of the authors of the paper \"Hypermethylation of the <I>TPEF/HPP1</I> Gene in Primary and Metastatic Colorectal Cancers\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Hypermethylation of the <I>TPEF/HPP1</I> Gene in Primary and Metastatic Colorectal Cancers'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Hypermethylation of the <I>TPEF/HPP1</I> Gene in Primary and Metastatic Colorectal Cancers'", "index": 1744, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Cancers', 'Cancer', 'Gene', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Colorectal cancer', 'Authors', 'Author', 'Title', 'TITLE', 'Name']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper \"Hypermethylation of the <I>TPEF/HPP1</I> Gene in Primary and Metastatic Colorectal Cancers\" refers to Title = 'Hypermethylation of the <I>TPEF/HPP1</I> Gene in Primary and Metastatic Colorectal Cancers'\nPlease list the names of the authors of the paper \"Hypermethylation of the <I>TPEF/HPP1</I> Gene in Primary and Metastatic Colorectal Cancers\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Title', 'TITLE', 'Name', 'NAME', 'No Title']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper \"Multiple paternity in a natural population of a salamander with long-term sperm storage\" refers to Title = 'Multiple paternity in a natural population of a salamander with long-term sperm storage'\nWhat is the full name of the journal that published the paper \"Multiple paternity in a natural population of a salamander with long-term sperm storage\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Title = 'Multiple paternity in a natural population of a salamander with long-term sperm storage'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Title = 'Multiple paternity in a natural population of a salamander with long-term sperm storage'", "index": 1745, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Title', 'TITLE', 'Name', 'NAME', 'No Title']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper \"Multiple paternity in a natural population of a salamander with long-term sperm storage\" refers to Title = 'Multiple paternity in a natural population of a salamander with long-term sperm storage'\nWhat is the full name of the journal that published the paper \"Multiple paternity in a natural population of a salamander with long-term sperm storage\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['proceeding', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Iet Software/iee Proceedings - Software', 'IET Software', 'Ice Proceedings', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\njournal \"Iet Software/iee Proceedings - Software\" refers to FullName = 'Iet Software/iee Proceedings - Software'; papers refers to COUNT(JournalId)\nHow many papers were in the journal \"Iet Software/iee Proceedings - Software\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(T1.JournalId) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T2.FullName = 'Iet Software/iee Proceedings - Software'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(T1.JournalId) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T2.FullName = 'Iet Software/iee Proceedings - Software'", "index": 1746, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['proceeding', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Iet Software/iee Proceedings - Software', 'IET Software', 'Ice Proceedings', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\njournal \"Iet Software/iee Proceedings - Software\" refers to FullName = 'Iet Software/iee Proceedings - Software'; papers refers to COUNT(JournalId)\nHow many papers were in the journal \"Iet Software/iee Proceedings - Software\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Titles', 'Title', 'TITLE', 'Name', 'NAME']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['ha', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Jun Du', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Jun DU', 'Jun Du', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npapers that Jundu has written refers to Name LIKE '%Jun du%'\nPlease list the titles of any two papers that Jundu has written.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name LIKE 'Jun du%' LIMIT 2", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name LIKE 'Jun du%' LIMIT 2", "index": 1747, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Titles', 'Title', 'TITLE', 'Name', 'NAME']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['ha', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Jun Du', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Jun DU', 'Jun Du', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npapers that Jundu has written refers to Name LIKE '%Jun du%'\nPlease list the titles of any two papers that Jundu has written.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Name', 'NAME', 'Conferences', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Jean-luc Hainaut', 'Jean-Luc Hainaut', 'J HAINAUT', 'P Hainaut', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Jean-luc Hainaut', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npapers of Jean-luc Hainaut refers to Name = 'Jean-luc Hainaut'\nPlease provide the full name of the conference where one of the papers of Jean-luc Hainaut were published.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT DISTINCT T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id WHERE T2.Name = 'Jean-luc Hainaut' LIMIT 1", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT DISTINCT T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id WHERE T2.Name = 'Jean-luc Hainaut' LIMIT 1", "index": 1748, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Name', 'NAME', 'Conferences', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Jean-luc Hainaut', 'Jean-Luc Hainaut', 'J HAINAUT', 'P Hainaut', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Jean-luc Hainaut', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npapers of Jean-luc Hainaut refers to Name = 'Jean-luc Hainaut'\nPlease provide the full name of the conference where one of the papers of Jean-luc Hainaut were published.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Andrew Cain', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Andrew Cain', 'Andrew', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nwritten by Andrew Cain refers to Name = 'Andrew Cain'\nWhat are the three journals that the papers written by Andrew Cain were published in? Please provide your answer with the full name of each journal.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T2.Name = 'Andrew Cain'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T2.Name = 'Andrew Cain'", "index": 1749, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Andrew Cain', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Andrew Cain', 'Andrew', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nwritten by Andrew Cain refers to Name = 'Andrew Cain'\nWhat are the three journals that the papers written by Andrew Cain were published in? Please provide your answer with the full name of each journal.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Authors', 'Author', 'Title', 'TITLE', 'A Framework', 'No Title']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['association', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Affiliation text, -- example: ['No Affiliation', 'No affiliation', 'No Affiliations', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper \"FIBER: A Generalized Framework for Auto-tuning Software\" refers to Title = 'FIBER: A Generalized Framework for Auto-tuning Software'; are affiliated with refers to Affiliation\nPlease list all of the associations that the authors of the paper \"FIBER: A Generalized Framework for Auto-tuning Software\" are 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT DISTINCT T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'FIBER: A Generalized Framework for Auto-tuning Software'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT DISTINCT T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'FIBER: A Generalized Framework for Auto-tuning Software'", "index": 1750, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Authors', 'Author', 'Title', 'TITLE', 'A Framework', 'No Title']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['association', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Affiliation text, -- example: ['No Affiliation', 'No affiliation', 'No Affiliations', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper \"FIBER: A Generalized Framework for Auto-tuning Software\" refers to Title = 'FIBER: A Generalized Framework for Auto-tuning Software'; are affiliated with refers to Affiliation\nPlease list all of the associations that the authors of the paper \"FIBER: A Generalized Framework for Auto-tuning Software\" are 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Journal', 'Titles', 'Title', 'TITLE', 'Name']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['preprint', 'Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npapers that are either preprinted or unpublished along refers to Year = 0\nPlease provide the titles of any two papers that are either preprinted or unpublished along with the full name of the journal to which those papers belong.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Title, T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Year < 1 LIMIT 2", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Title, T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Year < 1 LIMIT 2", "index": 1751, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Journal', 'Titles', 'Title', 'TITLE', 'Name']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['preprint', 'Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npapers that are either preprinted or unpublished along refers to Year = 0\nPlease provide the titles of any two papers that are either preprinted or unpublished along with the full name of the journal to which those papers belong.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['No Affiliation', 'No affiliation', 'No Affiliations', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['University of Oxford,', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\naffiliated with the University of Oxford refers to Affiliation = 'University of Oxford'\nList the names of authors affiliated with the University of Oxford 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT Name FROM Author WHERE Affiliation = 'University of Oxford' ORDER BY Name ASC", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT Name FROM Author WHERE Affiliation = 'University of Oxford' ORDER BY Name ASC", "index": 1752, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['No Affiliation', 'No affiliation', 'No Affiliations', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['University of Oxford,', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\naffiliated with the University of Oxford refers to Affiliation = 'University of Oxford'\nList the names of authors affiliated with the University of Oxford 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Conference on', 'International Conference on NLP', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['International Conference On', 'The International', 'Home Page', 'Artificial Intelligence Lab', 'Artificial Intelligence Www', 'Ernest Jordan']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['Artificial', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Artificial Intelligence', 'Intelligence', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nall the international conferences on artificial intelligence refers to FullName LIKE 'International Conference on Artificial Intelligence%'\nList the short name and home page URL of all the international conferences on artificial intelligence.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT ShortName, HomePage FROM Conference WHERE FullName LIKE 'International Conference on Artificial Intelligence%'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT ShortName, HomePage FROM Conference WHERE FullName LIKE 'International Conference on Artificial Intelligence%'", "index": 1753, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Conference on', 'International Conference on NLP', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['International Conference On', 'The International', 'Home Page', 'Artificial Intelligence Lab', 'Artificial Intelligence Www', 'Ernest Jordan']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['Artificial', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Artificial Intelligence', 'Intelligence', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nall the international conferences on artificial intelligence refers to FullName LIKE 'International Conference on Artificial Intelligence%'\nList the short name and home page URL of all the international conferences on artificial intelligence.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title and Author', 'The title', 'Journal', 'Author', 'Title', 'TITLE']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Neoplasia', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished in the 2007 refers to Year = 2007; Neoplasia journal refers to FullName = 'Neoplasia'\nList the title and author's name of papers published in the 2007 Neoplasia journal.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Title, T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T3.FullName = 'Neoplasia' AND T1.Year = 2007", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Title, T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T3.FullName = 'Neoplasia' AND T1.Year = 2007", "index": 1754, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title and Author', 'The title', 'Journal', 'Author', 'Title', 'TITLE']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Neoplasia', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished in the 2007 refers to Year = 2007; Neoplasia journal refers to FullName = 'Neoplasia'\nList the title and author's name of papers published in the 2007 Neoplasia journal.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['The World', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['World Computer Congress', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished in the World Computer Congress refers to FullName = 'World Computer Congress'; average refers to DIVIDE(COUNT(FullName = 'World Computer Congress'), COUNT(Id))\nWhat is the average number of papers published in the World Computer Congress 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT CAST(SUM(CASE WHEN T2.FullName = 'International Congress Series' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Id) AS Div1, T1.Year FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id GROUP BY T1.YEAR HAVING Div1 != 0", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT CAST(SUM(CASE WHEN T2.FullName = 'International Congress Series' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Id) AS Div1, T1.Year FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id GROUP BY T1.YEAR HAVING Div1 != 0", "index": 1755, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['The World', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['World Computer Congress', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished in the World Computer Congress refers to FullName = 'World Computer Congress'; average refers to DIVIDE(COUNT(FullName = 'World Computer Congress'), COUNT(Id))\nWhat is the average number of papers published in the World Computer Congress 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Authors', 'Author', 'Organizations', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Organization', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Otterbein University', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Otterbein University', 'No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nOtterbein University is an Affiliation\nHow many authors is affiliated to the organization \"Otterbein University\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(Name) FROM Author WHERE Affiliation = 'Otterbein University'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(Name) FROM Author WHERE Affiliation = 'Otterbein University'", "index": 1756, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Authors', 'Author', 'Organizations', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Organization', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Otterbein University', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Otterbein University', 'No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nOtterbein University is an Affiliation\nHow many authors is affiliated to the organization \"Otterbein University\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'Localization', 'The title', 'Authors', 'Author', 'Title']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Subcellular localization of nuclease in barley aleurone' is the title of paper\nHow many authors drafted the paper \"Subcellular localization of nuclease in barley aleurone\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(DISTINCT T2.Name) FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Subcellular localization of nuclease in barley aleurone'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(DISTINCT T2.Name) FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Subcellular localization of nuclease in barley aleurone'", "index": 1757, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'Localization', 'The title', 'Authors', 'Author', 'Title']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Subcellular localization of nuclease in barley aleurone' is the title of paper\nHow many authors drafted the paper \"Subcellular localization of nuclease in barley aleurone\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Mathematics', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Mathematics of Program Construction', 'Program Construction', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Mathematics of Program Construction' is the FullName of conference\nHow many papers are published under the conference \"Mathematics of Program Construction\n\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'Mathematics of Program Construction'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'Mathematics of Program Construction'", "index": 1758, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Mathematics', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Mathematics of Program Construction', 'Program Construction', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Mathematics of Program Construction' is the FullName of conference\nHow many papers are published under the conference \"Mathematics of Program Construction\n\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Jianli Hua', 'Jianli Hu', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Author', 'Title', 'TITLE', 'Authors', 'Stitching videos streamed by mobile phon']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nJianli Hua is the author of a paper\nList all the title of the paper that Jianli Hua published.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Jianli Hua'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Jianli Hua'", "index": 1759, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Jianli Hua', 'Jianli Hu', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['The title', 'Author', 'Title', 'TITLE', 'Authors', 'Stitching videos streamed by mobile phon']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nJianli Hua is the author of a paper\nList all the title of the paper that Jianli Hua published.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Timed Automata', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'O Automata', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Testing timed automata', 'Testing Timed Automata', 'Timed Automata', 'Automata', 'Author', 'Title']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Testing timed automata' is a title of a paper; Who authored refers to PaperAuthor.Name\nWho authored the paper titled \"Testing timed automata\n\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Testing timed automata'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Testing timed automata'", "index": 1760, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Timed Automata', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'O Automata', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Testing timed automata', 'Testing Timed Automata', 'Timed Automata', 'Automata', 'Author', 'Title']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Testing timed automata' is a title of a paper; Who authored refers to PaperAuthor.Name\nWho authored the paper titled \"Testing timed automata\n\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Theoretical Computer Science', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Title', 'TITLE', 'No Title', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'of Computer Science', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['Theoretical Computer Science', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Theoretical Computer Science' is the FullName; paper refers to Title; published in 2003 refers to Year = 2003\nList all the paper that the journal \"Theoretical Computer Science\n\" published in 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT DISTINCT T1.Title FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T2.FullName = 'Theoretical Computer Science' AND T1.Year = 2003 AND T1.Title <> ''", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT DISTINCT T1.Title FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T2.FullName = 'Theoretical Computer Science' AND T1.Year = 2003 AND T1.Title <> ''", "index": 1761, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Theoretical Computer Science', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Title', 'TITLE', 'No Title', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'of Computer Science', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['Theoretical Computer Science', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Theoretical Computer Science' is the FullName; paper refers to Title; published in 2003 refers to Year = 2003\nList all the paper that the journal \"Theoretical Computer Science\n\" published in 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Evaluation', 'The title', 'Content', 'Title', 'TITLE', 'Conferences']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nhomepage URL refers to HomePage; 'Quality evaluation of long duration audiovisual content' is the Title\nWhat is the conference homepage URL of the paper titled \"Quality evaluation of long duration audiovisual content\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Quality evaluation of long duration audiovisual content'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Quality evaluation of long duration audiovisual content'", "index": 1762, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Evaluation', 'The title', 'Content', 'Title', 'TITLE', 'Conferences']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nhomepage URL refers to HomePage; 'Quality evaluation of long duration audiovisual content' is the Title\nWhat is the conference homepage URL of the paper titled \"Quality evaluation of long duration audiovisual content\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['In Patients With', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['University of Ulsan', 'Medical', 'Center', 'Paper', 'Draft', 'FSU College of Medicine']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Asan', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Medicine', 'CentER', 'Draft', 'VA Medical Center', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['comparison', 'The title', 'Author', 'Title', 'TITLE', 'Stitching videos streamed by mobile phon']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['which', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nauthor refers to PaperAuthor.Name; 'A Randomized Comparison of Sirolimus- Versus Paclitaxel-Eluting Stent Implantation in Patients With Diabetes Mellitus' is the title; 'Asan Medical Center, University of Ulsan College of Medicine, Seoul, Korea' is an Affiliation\nAmong the author who drafted the paper \"A Randomized Comparison of Sirolimus- Versus Paclitaxel-Eluting Stent Implantation in Patients With Diabetes Mellitus\", which of them is/are affiliated with the Asan Medical Center, University of Ulsan College of Medicine, Seoul, Korea\n?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Affiliation = 'Asan Medical Center, University of Ulsan College of Medicine, Seoul, Korea' AND T1.Title = 'A Randomized Comparison of Sirolimus- Versus Paclitaxel-Eluting Stent Implantation in Patients With Diabetes Mellitus'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Affiliation = 'Asan Medical Center, University of Ulsan College of Medicine, Seoul, Korea' AND T1.Title = 'A Randomized Comparison of Sirolimus- Versus Paclitaxel-Eluting Stent Implantation in Patients With Diabetes Mellitus'", "index": 1763, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['In Patients With', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['University of Ulsan', 'Medical', 'Center', 'Paper', 'Draft', 'FSU College of Medicine']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Asan', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Medicine', 'CentER', 'Draft', 'VA Medical Center', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['comparison', 'The title', 'Author', 'Title', 'TITLE', 'Stitching videos streamed by mobile phon']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['which', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nauthor refers to PaperAuthor.Name; 'A Randomized Comparison of Sirolimus- Versus Paclitaxel-Eluting Stent Implantation in Patients With Diabetes Mellitus' is the title; 'Asan Medical Center, University of Ulsan College of Medicine, Seoul, Korea' is an Affiliation\nAmong the author who drafted the paper \"A Randomized Comparison of Sirolimus- Versus Paclitaxel-Eluting Stent Implantation in Patients With Diabetes Mellitus\", which of them is/are affiliated with the Asan Medical Center, University of Ulsan College of Medicine, Seoul, Korea\n?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Software - Practice and Experience', 'Practice', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npapers refers to Paper.Id; 'Software - Practice and Experience' is the FullName of a journal;\nHow many papers are published under the journal \"Software - Practice and Experience\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T2.FullName = 'Software - Practice and Experience'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T2.FullName = 'Software - Practice and Experience'", "index": 1764, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Software - Practice and Experience', 'Practice', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npapers refers to Paper.Id; 'Software - Practice and Experience' is the FullName of a journal;\nHow many papers are published under the journal \"Software - Practice and Experience\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Conferences', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.irma-international.org/', 'http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper refers to Paper.Title; http://www.irma-international.org/ is the HomePage\nList all the paper that were under the conference homepage URL \"http://www.irma-international.org/\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Title FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.HomePage = 'http://www.irma-international.org/'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Title FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.HomePage = 'http://www.irma-international.org/'", "index": 1765, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Conferences', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.irma-international.org/', 'http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper refers to Paper.Title; http://www.irma-international.org/ is the HomePage\nList all the paper that were under the conference homepage URL \"http://www.irma-international.org/\".\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['TOOLS', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Structure', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['In Structured Programming', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Software - Concepts and Tools / Structured Programming' is the FullName;\nWhat is the short name for \"Software - Concepts and Tools / Structured Programming\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT ShortName FROM Journal WHERE FullName = 'Software - Concepts and Tools / Structured Programming'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT ShortName FROM Journal WHERE FullName = 'Software - Concepts and Tools / Structured Programming'", "index": 1766, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['TOOLS', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Structure', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['In Structured Programming', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Software - Concepts and Tools / Structured Programming' is the FullName;\nWhat is the short name for \"Software - Concepts and Tools / Structured Programming\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['IEEE', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Transactions', 'Journal', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['The Number', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'IEEE', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['IEEE Transactions on Nuclear Science', 'Iie Transactions', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['IEEE', 'Ieee', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'IEEE Transactions on Nuclear Science' is the FullName of journal; 1999 refers to Year = '1999'; papers refers to Paper.Id\nGive the number of papers that were published on \"IEEE Transactions on Nuclear Science\" in 1999.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(T2.Id) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'IEEE Transactions on Nuclear Science' AND T2.Year = 1999", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(T2.Id) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'IEEE Transactions on Nuclear Science' AND T2.Year = 1999", "index": 1767, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['IEEE', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Transactions', 'Journal', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['The Number', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'IEEE', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['IEEE Transactions on Nuclear Science', 'Iie Transactions', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['IEEE', 'Ieee', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'IEEE Transactions on Nuclear Science' is the FullName of journal; 1999 refers to Year = '1999'; papers refers to Paper.Id\nGive the number of papers that were published on \"IEEE Transactions on Nuclear Science\" in 1999.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IEEE', 'IADIS', 'IADT']\n FullName text, -- example: ['Machine Intelligence', 'IEEE', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['IEEE', 'Ieee', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['IEEE', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Machine intelligence', 'Title of Paper', 'Transactions', 'Journal', 'Title', 'TITLE']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Machine Intelligence', 'Pattern Analysis', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'IEEE', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Intelligence', 'Iie Transactions', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'IEEE Transactions on Pattern Analysis and Machine Intelligence' is the FullName of journal; 2011 refers to Year = '2011'; name of the paper refers to Title of paper\nWhat was the name of the paper that was published on \"IEEE Transactions on Pattern Analysis and Machine Intelligence\" in 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Title FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'IEEE Transactions on Pattern Analysis and Machine Intelligence' AND T2.Year = 2011 AND T2.Title <> ''", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Title FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'IEEE Transactions on Pattern Analysis and Machine Intelligence' AND T2.Year = 2011 AND T2.Title <> ''", "index": 1768, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IEEE', 'IADIS', 'IADT']\n FullName text, -- example: ['Machine Intelligence', 'IEEE', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['IEEE', 'Ieee', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['IEEE', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Machine intelligence', 'Title of Paper', 'Transactions', 'Journal', 'Title', 'TITLE']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Machine Intelligence', 'Pattern Analysis', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'IEEE', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Intelligence', 'Iie Transactions', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'IEEE Transactions on Pattern Analysis and Machine Intelligence' is the FullName of journal; 2011 refers to Year = '2011'; name of the paper refers to Title of paper\nWhat was the name of the paper that was published on \"IEEE Transactions on Pattern Analysis and Machine Intelligence\" in 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Zvezdan Protić', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['preprint', 'Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Present', 'PRESENT', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['which', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nYear = 0 means this paper is preprint, or not published\nFor the paper which was presented by \"Zvezdan Protić\", was it preprinted?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT CASE WHEN T1.Year = 0 THEN 'TRUE' ELSE 'FALSE' END FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Zvezdan Protić' AND T1.ConferenceId = 0 AND T1.JournalId = 0", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT CASE WHEN T1.Year = 0 THEN 'TRUE' ELSE 'FALSE' END FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Zvezdan Protić' AND T1.ConferenceId = 0 AND T1.JournalId = 0", "index": 1769, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Zvezdan Protić', 'ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['preprint', 'Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Present', 'PRESENT', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['which', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nYear = 0 means this paper is preprint, or not published\nFor the paper which was presented by \"Zvezdan Protić\", was it preprinted?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Home Page', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Increasing the Concurrency in Estelle', 'Concurrency', 'The title', 'Present', 'PRESENT', 'Title']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['CONCURRENCY', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Increasing the Concurrency in Estelle' is the Title of the paper; home page of the conference refers to HomePage;\nGives the home page of the conference where the paper \"Increasing the Concurrency in Estelle\" is presented.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT DISTINCT T2.HomePage FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Increasing the Concurrency in Estelle'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT DISTINCT T2.HomePage FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Increasing the Concurrency in Estelle'", "index": 1770, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Home Page', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Increasing the Concurrency in Estelle', 'Concurrency', 'The title', 'Present', 'PRESENT', 'Title']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['CONCURRENCY', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Increasing the Concurrency in Estelle' is the Title of the paper; home page of the conference refers to HomePage;\nGives the home page of the conference where the paper \"Increasing the Concurrency in Estelle\" is presented.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['which', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['The Most', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nPapers refers to Paper.Id; short name of the conference refers to Conference.ShortName\nIn the year 2012, which conference had the most papers presented? Give the short name of the conference.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.ShortName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Year = '2012' GROUP BY T1.ConferenceId ORDER BY COUNT(T1.Id) DESC LIMIT 1", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.ShortName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Year = '2012' GROUP BY T1.ConferenceId ORDER BY COUNT(T1.Id) DESC LIMIT 1", "index": 1771, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['which', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['The Most', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nPapers refers to Paper.Id; short name of the conference refers to Conference.ShortName\nIn the year 2012, which conference had the most papers presented? Give the short name of the conference.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['RADAR', 'IADIS', 'IADT']\n FullName text, -- example: ['International Radar Symposium', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['radar', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Presented At5', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'International Radar Symposium' is the FullName of the conference; 2012 refers to Year = '2012'\nShow the keywords of the paper that was presented at \"International Radar Symposium\" in 2012.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Keyword FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Radar Symposium' AND T1.Year = 2012", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Keyword FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Radar Symposium' AND T1.Year = 2012", "index": 1772, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['RADAR', 'IADIS', 'IADT']\n FullName text, -- example: ['International Radar Symposium', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['radar', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Presented At5', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'International Radar Symposium' is the FullName of the conference; 2012 refers to Year = '2012'\nShow the keywords of the paper that was presented at \"International Radar Symposium\" in 2012.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['International Conference On', 'Wireless Networks', 'Mobile Computing', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Mobile Computing', 'Communications', 'Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Wireless Networks', 'Communications', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'SUM', 'IADIS', 'IADT']\n FullName text, -- example: ['International Conference on', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['International Conference', 'Mobile computing', 'Communications', 'Conference on ', 'Communication', 'Present']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['Communication', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'International Conference on Thermoelectrics' AND 'International Conference on Wireless Networks, Communications and Mobile Computing' are the FullName of the conference; Papers refers to Paper.Id; Calculation = SUBTRACT(SUM(Paper.Id where FullName = 'International Conference on Thermoelectrics'), SUM(Paper.Id where FullName = 'International Conference on Wireless Networks, Communications and Mobile Computing'))\nHow many times more for the papers that were presented at the \"International Conference on Thermoelectrics\" conference than \"International Conference on Wireless Networks, Communications and Mobile Computing“ conference?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT CAST(SUM(CASE WHEN T2.FullName = 'International Conference on Thermoelectrics' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.FullName = 'International Conference on Wireless Networks, Communications and Mobile Computing' THEN 1 ELSE 0 END) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT CAST(SUM(CASE WHEN T2.FullName = 'International Conference on Thermoelectrics' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.FullName = 'International Conference on Wireless Networks, Communications and Mobile Computing' THEN 1 ELSE 0 END) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id", "index": 1773, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['International Conference On', 'Wireless Networks', 'Mobile Computing', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Mobile Computing', 'Communications', 'Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Wireless Networks', 'Communications', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'SUM', 'IADIS', 'IADT']\n FullName text, -- example: ['International Conference on', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['International Conference', 'Mobile computing', 'Communications', 'Conference on ', 'Communication', 'Present']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['Communication', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'International Conference on Thermoelectrics' AND 'International Conference on Wireless Networks, Communications and Mobile Computing' are the FullName of the conference; Papers refers to Paper.Id; Calculation = SUBTRACT(SUM(Paper.Id where FullName = 'International Conference on Thermoelectrics'), SUM(Paper.Id where FullName = 'International Conference on Wireless Networks, Communications and Mobile Computing'))\nHow many times more for the papers that were presented at the \"International Conference on Thermoelectrics\" conference than \"International Conference on Wireless Networks, Communications and Mobile Computing“ conference?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title', 'TITLE', 'No Title', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished book refers to Title; the oldest book refers to MIN(Year)\nWhat is the oldest published 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT Title FROM Paper WHERE Year > 0 ORDER BY Year ASC LIMIT 1", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT Title FROM Paper WHERE Year > 0 ORDER BY Year ASC LIMIT 1", "index": 1774, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title', 'TITLE', 'No Title', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished book refers to Title; the oldest book refers to MIN(Year)\nWhat is the oldest published 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['NASA Langley Research Center', 'Langley Research Center', 'Research Center', 'Center', 'NASA', 'NASA Langley Research Center,']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['NASA Langley Research Center', 'Langley Research Center', 'Research Center', 'CentER', 'NASA', 'No Affiliation']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['NASA Langley Research Center', 'RESEARCH CENTER', 'Authors', 'Author', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['NASA', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nNASA Langley Research Center is the Affiliation\nHow many authors are affiliated with NASA Langley Research Center?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(Name) FROM Author WHERE Affiliation = 'NASA Langley Research Center'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(Name) FROM Author WHERE Affiliation = 'NASA Langley Research Center'", "index": 1775, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['NASA Langley Research Center', 'Langley Research Center', 'Research Center', 'Center', 'NASA', 'NASA Langley Research Center,']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['NASA Langley Research Center', 'Langley Research Center', 'Research Center', 'CentER', 'NASA', 'No Affiliation']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['NASA Langley Research Center', 'RESEARCH CENTER', 'Authors', 'Author', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['NASA', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nNASA Langley Research Center is the Affiliation\nHow many authors are affiliated with NASA Langley Research Center?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nyear = 0 means this paper is preprint; papers refers to Paper.Id\nHow many of the papers are preprinted?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(Id) FROM Paper WHERE ConferenceId = 0 AND JournalId = 0", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(Id) FROM Paper WHERE ConferenceId = 0 AND JournalId = 0", "index": 1776, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nyear = 0 means this paper is preprint; papers refers to Paper.Id\nHow many of the papers are preprinted?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Title', 'TITLE', 'No Title', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['TUBERCLE LUNG DIS', 'ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper refers to Title; TUBERCLE LUNG DIS is the ShortName of journal; the oldest refers to MIN(Year)\nWhich paper published by the \"TUBERCLE LUNG DIS\" journal is the oldest?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Title FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.ShortName = 'TUBERCLE LUNG DIS' ORDER BY T2.Year ASC LIMIT 1", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Title FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.ShortName = 'TUBERCLE LUNG DIS' ORDER BY T2.Year ASC LIMIT 1", "index": 1777, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Title', 'TITLE', 'No Title', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['TUBERCLE LUNG DIS', 'ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npaper refers to Title; TUBERCLE LUNG DIS is the ShortName of journal; the oldest refers to MIN(Year)\nWhich paper published by the \"TUBERCLE LUNG DIS\" journal is the oldest?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Karin Rengefors', 'KARIN RENGEFORS', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Title', 'TITLE', 'Name', 'NAME', 'No Title']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Karin Rengefors', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nall the papers refers to Title; Karin Rengefors is the Name of the author\nList all of the papers written by the author \"Karin Rengefors.\"\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Name = 'Karin Rengefors'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Name = 'Karin Rengefors'", "index": 1778, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Karin Rengefors', 'KARIN RENGEFORS', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Title', 'TITLE', 'Name', 'NAME', 'No Title']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Karin Rengefors', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nall the papers refers to Title; Karin Rengefors is the Name of the author\nList all of the papers written by the author \"Karin Rengefors.\"\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Sensors', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Determination of ', 'Authors', 'Author', 'Title', 'TITLE', 'A Determination of ']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Determination of Planetary Meteorology from Aerobot Flight Sensors' refer to title of the paper\nWho are the authors of the paper \"Determination of Planetary Meteorology from Aerobot Flight Sensors\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Determination of Planetary Meteorology FROM Aerobot Flight Sensors'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Determination of Planetary Meteorology FROM Aerobot Flight Sensors'", "index": 1779, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Sensors', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Determination of ', 'Authors', 'Author', 'Title', 'TITLE', 'A Determination of ']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Determination of Planetary Meteorology from Aerobot Flight Sensors' refer to title of the paper\nWho are the authors of the paper \"Determination of Planetary Meteorology from Aerobot Flight Sensors\"?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished the most papers refer to MAX(JournalId); homepage URL refers to HomePage\nWhat is the homepage URL for the journal that published the most papers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id GROUP BY T1.JournalId ORDER BY COUNT(T1.JournalId) DESC LIMIT 1", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id GROUP BY T1.JournalId ORDER BY COUNT(T1.JournalId) DESC LIMIT 1", "index": 1780, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Journal', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished the most papers refer to MAX(JournalId); homepage URL refers to HomePage\nWhat is the homepage URL for the journal that published the most papers?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Cancer', 'Cancers', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['No Affiliations', 'No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['cancer', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nProportion refer to DIVIDE(COUNT(Keyword = ’cancer’), COUNT(PaperID))\nWhat is the proportion of the papers that have the keyword \"cancer\"? Please provide a list of authors and their affiliations.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT CAST(SUM(CASE WHEN T1.Keyword = 'cancer' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Id), T2.Name, T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT CAST(SUM(CASE WHEN T1.Keyword = 'cancer' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Id), T2.Name, T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId", "index": 1781, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Cancer', 'Cancers', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['No Affiliations', 'No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['cancer', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Authors:', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nProportion refer to DIVIDE(COUNT(Keyword = ’cancer’), COUNT(PaperID))\nWhat is the proportion of the papers that have the keyword \"cancer\"? Please provide a list of authors and their affiliations.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Name', 'NAME', 'Authors', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['University of Illinois Chicago', 'University Of Illinois', 'University of Illinois', 'Illinois', 'U of Illinois', 'No Affiliation']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['University of Illinois Chicago', 'University of Illinois', ' University of Illinois at', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'University of Illinois Chicago' is an affiliation\nList the name of the author that affiliated with University of Illinois Chicago?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT Name FROM Author WHERE Affiliation = 'University of Illinois Chicago'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT Name FROM Author WHERE Affiliation = 'University of Illinois Chicago'", "index": 1782, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Name', 'NAME', 'Authors', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['University of Illinois Chicago', 'University Of Illinois', 'University of Illinois', 'Illinois', 'U of Illinois', 'No Affiliation']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['University of Illinois Chicago', 'University of Illinois', ' University of Illinois at', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'University of Illinois Chicago' is an affiliation\nList the name of the author that affiliated with University of Illinois Chicago?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Education, democracy and growth', 'Education, Democracy and Growth', 'Democracy and growth', 'Title of Paper', 'Author', 'Title']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nEducation, democracy and growth' refer to title of paper\n\nState the name and affiliation of author for the 'Education, democracy and growth' paper?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.Name, T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Education, democracy and growth'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.Name, T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Education, democracy and growth'", "index": 1783, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Education, democracy and growth', 'Education, Democracy and Growth', 'Democracy and growth', 'Title of Paper', 'Author', 'Title']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nEducation, democracy and growth' refer to title of paper\n\nState the name and affiliation of author for the 'Education, democracy and growth' paper?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['J NAVIG', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['A paradigm', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'Navigation', 'The title', 'Title', 'TITLE', 'Name']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['web data', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nA context-based navigation paradigm for accessing Web data' is the title of paper; name of conference refer to FullName\n\nWhere was the 'A context-based navigation paradigm for accessing Web data' paper published? State the name of the conference.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T2.FullName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'A context-based navigation paradigm for accessing Web data'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T2.FullName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'A context-based navigation paradigm for accessing Web data'", "index": 1784, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['J NAVIG', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['A paradigm', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'Navigation', 'The title', 'Title', 'TITLE', 'Name']\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['web data', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nA context-based navigation paradigm for accessing Web data' is the title of paper; name of conference refer to FullName\n\nWhere was the 'A context-based navigation paradigm for accessing Web data' paper published? State the name of the conference.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'IADIS', 'IADT']\n FullName text, -- example: ['Workshops', 'International Workshop on Nano', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Inductive Logic Programming', 'Nd International Workshop', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFrom 2001 to 2009 refer to Year 2001 BETWEEN 2009; 'International Workshop on Inductive Logic Programming' refer to Conference.FullName\n\nHow many papers were published in International Workshop on Inductive Logic Programming from 2001 to 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Workshop on Inductive Logic Programming' AND T1.Year BETWEEN 2001 AND 2009", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Workshop on Inductive Logic Programming' AND T1.Year BETWEEN 2001 AND 2009", "index": 1785, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'IADIS', 'IADT']\n FullName text, -- example: ['Workshops', 'International Workshop on Nano', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Inductive Logic Programming', 'Nd International Workshop', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nFrom 2001 to 2009 refer to Year 2001 BETWEEN 2009; 'International Workshop on Inductive Logic Programming' refer to Conference.FullName\n\nHow many papers were published in International Workshop on Inductive Logic Programming from 2001 to 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ELECTR', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Name', 'NAME', 'Organizations', 'Authors', 'Stitching videos streamed by mobile phon']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['named', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['ABB', 'No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Organization', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['ABB Electrical Machines', 'ABB', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'ABB Electrical Machines' is an affiliation\nProvide the name of the author who is affiliated with the organization named 'ABB Electrical Machines'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT Name FROM Author WHERE Affiliation = 'ABB Electrical Machines'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT Name FROM Author WHERE Affiliation = 'ABB Electrical Machines'", "index": 1786, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ELECTR', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Name', 'NAME', 'Organizations', 'Authors', 'Stitching videos streamed by mobile phon']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['named', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['ABB', 'No Affiliation', 'No affiliation', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Organization', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['ABB Electrical Machines', 'ABB', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'ABB Electrical Machines' is an affiliation\nProvide the name of the author who is affiliated with the organization named 'ABB Electrical Machines'.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['named', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Medicine', 'Academic', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Academic Medicine', 'Medicine', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['The Number', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Academic', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Academic Medicine' is the FullName of journal; between 2005 and 2010 refer to Year 2005 BETWEEN 2010\nProvide the number of publications published in the journal named 'Academic Medicine' between 2005 and 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(T2.JournalId) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'Academic Medicine' AND T2.Year BETWEEN 2005 AND 2010", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(T2.JournalId) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'Academic Medicine' AND T2.Year BETWEEN 2005 AND 2010", "index": 1787, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['named', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Medicine', 'Academic', 'Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['Academic Medicine', 'Medicine', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['The Number', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Academic', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Academic Medicine' is the FullName of journal; between 2005 and 2010 refer to Year 2005 BETWEEN 2010\nProvide the number of publications published in the journal named 'Academic Medicine' between 2005 and 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Multimedia Retrieval', 'Multimedia', 'Adaptive ', 'Conferences', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'IADIS', 'IADT']\n FullName text, -- example: ['Adaptive Multimedia Retrieval', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Adaptive Multimedia Retrieval is the FullName of paper; in 2007 refer to Year = 2007\nHow many publications were published in relation to the conference 'Adaptive Multimedia Retrieval' in 2007?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(T2.ConferenceId) FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T1.FullName = 'Adaptive Multimedia Retrieval' AND T2.Year = 2007", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT COUNT(T2.ConferenceId) FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T1.FullName = 'Adaptive Multimedia Retrieval' AND T2.Year = 2007", "index": 1788, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Multimedia Retrieval', 'Multimedia', 'Adaptive ', 'Conferences', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['WeRE', 'IADIS', 'IADT']\n FullName text, -- example: ['Adaptive Multimedia Retrieval', 'International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Adaptive Multimedia Retrieval is the FullName of paper; in 2007 refer to Year = 2007\nHow many publications were published in relation to the conference 'Adaptive Multimedia Retrieval' in 2007?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Information Science', 'Journal', 'Name', 'NAME', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['Information Science', 'INFORMATION', 'information', 'named', 'information.', 'mobile video capturing|real-time|video s']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Information Science', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['INFORMS', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Information Sciences', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Information Sciences' is the FullName of journal; average = DIVIDE(COUNT(JournalId = 48), COUNT(Years))\nProvide the average number of papers that are published in the journal named 'Information Sciences' annually.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT CAST(COUNT(T2.JournalId) AS REAL) / COUNT(DISTINCT T2.Year) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'Information Sciences'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT CAST(COUNT(T2.JournalId) AS REAL) / COUNT(DISTINCT T2.Year) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'Information Sciences'", "index": 1789, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Information Science', 'Journal', 'Name', 'NAME', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['Information Science', 'INFORMATION', 'information', 'named', 'information.', 'mobile video capturing|real-time|video s']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Information Science', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['INFORMS', 'ICOM', 'AEPIA']\n FullName text, -- example: ['Information Sciences', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Information Sciences' is the FullName of journal; average = DIVIDE(COUNT(JournalId = 48), COUNT(Years))\nProvide the average number of papers that are published in the journal named 'Information Sciences' annually.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Physics of Fluids', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['named', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Physics of Fluids' is the FullName of journal; percentage = DIVIDE(SUM(Keyword = 'Turbulent Fluids'), SUM(FullName = 'Physics of Fluids')) as percentage\nAmong all publications containing keywords 'Turbulent Fluids', what percentage of them was published in the journal named 'Physics of Fluids'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT CAST(SUM(CASE WHEN T1.Keyword = 'Turbulent Fluids' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.FullName = 'Physics of Fluids' THEN 1 ELSE 0 END) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT CAST(SUM(CASE WHEN T1.Keyword = 'Turbulent Fluids' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.FullName = 'Physics of Fluids' THEN 1 ELSE 0 END) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id", "index": 1790, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Physics of Fluids', 'Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['named', 'mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Physics of Fluids' is the FullName of journal; percentage = DIVIDE(SUM(Keyword = 'Turbulent Fluids'), SUM(FullName = 'Physics of Fluids')) as percentage\nAmong all publications containing keywords 'Turbulent Fluids', what percentage of them was published in the journal named 'Physics of Fluids'?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICCI', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'ICCI' is the ShortName of conference; URL refer to HomePage\nList out the full name and URL link of ICCI?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT FullName, HomePage FROM Conference WHERE ShortName = 'ICCI'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT FullName, HomePage FROM Conference WHERE ShortName = 'ICCI'", "index": 1791, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICCI', 'IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'ICCI' is the ShortName of conference; URL refer to HomePage\nList out the full name and URL link of ICCI?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Joe Lograsso', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Name', 'NAME', 'Authors', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Joe Lograsso' is name of paper author\nMention the titile of paper writen by Joe Lograsso.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Joe Lograsso'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Joe Lograsso'", "index": 1792, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['Joe Lograsso', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Name', 'NAME', 'Authors', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Joe Lograsso' is name of paper author\nMention the titile of paper writen by Joe Lograsso.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['A Barrasa', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'Author', 'Title', 'TITLE', 'Name', 'NAME']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Barassa' is name of paper author\nState the year and title of papers written by Barrasa.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Year, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Barrasa'", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Year, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Barrasa'", "index": 1793, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['A Barrasa', 'ADAM G. JONES', 'Kazuo Iwama']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Title of Paper', 'Author', 'Title', 'TITLE', 'Name', 'NAME']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\n'Barassa' is name of paper author\nState the year and title of papers written by Barrasa.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Name', 'NAME', 'Authors', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Author Name', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished year refers to year\nSate the author name and published year for paper id 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Name, T3.Year FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId INNER JOIN Paper AS T3 ON T2.PaperId = T3.Id WHERE T2.PaperId = 2", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Name, T3.Year FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId INNER JOIN Paper AS T3 ON T2.PaperId = T3.Id WHERE T2.PaperId = 2", "index": 1794, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n Title text, -- example: ['Author', 'Name', 'NAME', 'Authors', 'Stitching videos streamed by mobile phon', 'A nonlocal convection–diffusion equation']\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Author Name', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['IADIS', 'IADT']\n FullName text, -- example: ['International Association for Developmen', 'Issues and Applications of Database Tech']\n HomePage text, -- example: ['http://www.informatik.uni-trier.de/~ley/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n ShortName text, -- example: ['ICOM', 'AEPIA']\n FullName text, -- example: ['Zeitschrift Für Interaktive Und Kooperat', 'Inteligencia Artificial,revista Iberoame']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\npublished year refers to year\nSate the author name and published year for paper id 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Name Of Author', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nMention the name of author for paper id 5 and state the keyword of this page.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.Name, T3.Keyword FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId INNER JOIN Paper AS T3 ON T2.PaperId = T3.Id WHERE T2.PaperId = 5", "style": "rule" }
{ "db_id": "authors.sqlite", "gt_sql": "SELECT T1.Name, T3.Keyword FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId INNER JOIN Paper AS T3 ON T2.PaperId = T3.Id WHERE T2.PaperId = 5", "index": 1795, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE Paper (\n Id integer, -- example: [1, 2]\n `Year` integer, -- example: [2009, 2007]\n ConferenceId integer, -- example: [167, 0]\n JournalId integer, -- example: [0, 7234]\n Keyword text, -- example: ['mobile video capturing|real-time|video s', 'Nonlocal diffusion; Convection–diffusion']\n PRIMARY KEY (Id),\n CONSTRAINT fk_paper_conferenceid FOREIGN KEY (ConferenceId) REFERENCES Conference (Id),\n CONSTRAINT fk_paper_journalid FOREIGN KEY (JournalId) REFERENCES Journal (Id)\n);\n\nCREATE TABLE PaperAuthor (\n PaperId integer, -- example: [4, 5]\n AuthorId integer, -- example: [1456512, 1102257]\n Name text, -- example: ['ADAM G. JONES', 'Kazuo Iwama']\n Affiliation text, -- example: ['Kyushu University 812 Fukuoka Japan 812 ', 'The french National Institute for Resear']\n CONSTRAINT fk_paperauthor_paperid FOREIGN KEY (PaperId) REFERENCES Paper (Id),\n CONSTRAINT fk_paperauthor_authorid FOREIGN KEY (AuthorId) REFERENCES Author (Id)\n);\n\nCREATE TABLE Author (\n Id integer, -- example: [9, 14]\n Name text, -- example: ['Name Of Author', 'A Paper', 'Ernest Jordan', 'K. MORIBE']\n Affiliation text, -- example: ['Paper', 'Cavendish Laboratory|Cambridge Universit', 'Department of Molecular Biology|School o']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Journal (\n Id integer, -- example: [1, 2]\n HomePage text, -- example: ['http://www.i-com-media.de', 'http://aepia.dsic.upv.es/revista/']\n PRIMARY KEY (Id)\n);\n\nCREATE TABLE Conference (\n Id integer, -- example: [1, 2]\n PRIMARY KEY (Id)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nMention the name of author for paper id 5 and state the keyword of this page.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE institution_details (\n unitid integer, -- Unit ID number, example: [100654, 100663]\n chronname text, -- example: ['Alabama A&M University', 'University of Alabama at Birmingham']\n state text, -- example: ['Alabama', 'Alaska']\n basic text, -- example: ['Masters Colleges and Universities--large', 'Research Universities--very high researc']\n long_x real, -- example: [-86.568502, -86.80917]\n ft_pct real, -- Full-time percentage, example: [93.8, 72.7]\n med_sat_percentile text, -- median SAT percentile, example: ['0', '84']\n ft_fac_value real, -- full time faculty value, example: [82.8, 92.4]\n vsa_grad_elsewhere_after6_first text, -- voluntary system of accountability graduation elsewhere after 6 year first time, example: ['5.3', '10.5']\n vsa_grad_elsewhere_after4_transfer text, -- voluntary system of accountability graduation elsewhere after 4 year, example: ['1.5', 'NULL']\n carnegie_ct integer, -- example: [386, 106]\n counted_pct text, -- example: ['99.7|07', '56.0|07']\n cohort_size integer, -- example: [882, 1376]\n PRIMARY KEY (unitid)\n);\n\nCREATE TABLE state_sector_details (\n stateid integer, -- example: [0, 1]\n state text, -- state name, example: ['United States', 'Alabama']\n state_post text, -- example: ['U.S.', 'Ala.']\n level text, -- example: ['2-year', '4-year']\n control text, -- example: ['Private for-profit', 'Private not-for-profit']\n counted_pct text, -- counted percentage, example: ['NULL', '61']\n exp_award_state_value text, -- expected award state value, example: ['NULL', '75743']\n PRIMARY KEY (stateid, level, control),\n CONSTRAINT fk_state_sector_details_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\n\nCREATE TABLE institution_grads (\n unitid integer, -- example: [100760, 101028]\n `year` integer, -- example: [2011, 2012]\n race text, -- example: ['Ai', 'X', 'W']\n cohort text, -- example: ['2y all', '4y other']\n grad_cohort text, -- graduation cohort, example: ['446', '185']\n grad_150 text, -- graduation 150, example: ['105', '40']\n CONSTRAINT fk_institution_grads_unitid FOREIGN KEY (unitid) REFERENCES institution_details (unitid)\n);\n\nCREATE TABLE state_sector_grads (\n stateid integer, -- example: [1, 2]\n state text, -- state name, example: ['Alabama', 'Alaska']\n `year` integer, -- example: [2011, 2012]\n gender text, -- example: ['B', 'F']\n race text, -- example: ['Ai', 'A']\n cohort text, -- example: ['4y bach', '4y other']\n grad_cohort text, -- graduation cohort, example: ['0', '1']\n grad_150_rate text, -- example: ['NULL', '0']\n grad_cohort_ct integer, -- graduation cohort count, example: [9, 16]\n CONSTRAINT fk_state_sector_grads_stateid FOREIGN KEY (stateid) REFERENCES state_sector_details (stateid),\n CONSTRAINT fk_state_sector_grads_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\ninstitutes refers to chronname; American Indian refers to race = 'Ai'; most number of American Indian refers to MAX(COUNT(race = 'Ai')); in 2007 refers to year = '2007';\nList the all the institutes from the state with the most number of American Indian in 2007.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2007 AND T2.race = 'Ai' GROUP BY T1.chronname ORDER BY COUNT(T1.chronname) DESC LIMIT 1", "style": "rule" }
{ "db_id": "college_completion.sqlite", "gt_sql": "SELECT T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2007 AND T2.race = 'Ai' GROUP BY T1.chronname ORDER BY COUNT(T1.chronname) DESC LIMIT 1", "index": 1796, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE institution_details (\n unitid integer, -- Unit ID number, example: [100654, 100663]\n chronname text, -- example: ['Alabama A&M University', 'University of Alabama at Birmingham']\n state text, -- example: ['Alabama', 'Alaska']\n basic text, -- example: ['Masters Colleges and Universities--large', 'Research Universities--very high researc']\n long_x real, -- example: [-86.568502, -86.80917]\n ft_pct real, -- Full-time percentage, example: [93.8, 72.7]\n med_sat_percentile text, -- median SAT percentile, example: ['0', '84']\n ft_fac_value real, -- full time faculty value, example: [82.8, 92.4]\n vsa_grad_elsewhere_after6_first text, -- voluntary system of accountability graduation elsewhere after 6 year first time, example: ['5.3', '10.5']\n vsa_grad_elsewhere_after4_transfer text, -- voluntary system of accountability graduation elsewhere after 4 year, example: ['1.5', 'NULL']\n carnegie_ct integer, -- example: [386, 106]\n counted_pct text, -- example: ['99.7|07', '56.0|07']\n cohort_size integer, -- example: [882, 1376]\n PRIMARY KEY (unitid)\n);\n\nCREATE TABLE state_sector_details (\n stateid integer, -- example: [0, 1]\n state text, -- state name, example: ['United States', 'Alabama']\n state_post text, -- example: ['U.S.', 'Ala.']\n level text, -- example: ['2-year', '4-year']\n control text, -- example: ['Private for-profit', 'Private not-for-profit']\n counted_pct text, -- counted percentage, example: ['NULL', '61']\n exp_award_state_value text, -- expected award state value, example: ['NULL', '75743']\n PRIMARY KEY (stateid, level, control),\n CONSTRAINT fk_state_sector_details_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\n\nCREATE TABLE institution_grads (\n unitid integer, -- example: [100760, 101028]\n `year` integer, -- example: [2011, 2012]\n race text, -- example: ['Ai', 'X', 'W']\n cohort text, -- example: ['2y all', '4y other']\n grad_cohort text, -- graduation cohort, example: ['446', '185']\n grad_150 text, -- graduation 150, example: ['105', '40']\n CONSTRAINT fk_institution_grads_unitid FOREIGN KEY (unitid) REFERENCES institution_details (unitid)\n);\n\nCREATE TABLE state_sector_grads (\n stateid integer, -- example: [1, 2]\n state text, -- state name, example: ['Alabama', 'Alaska']\n `year` integer, -- example: [2011, 2012]\n gender text, -- example: ['B', 'F']\n race text, -- example: ['Ai', 'A']\n cohort text, -- example: ['4y bach', '4y other']\n grad_cohort text, -- graduation cohort, example: ['0', '1']\n grad_150_rate text, -- example: ['NULL', '0']\n grad_cohort_ct integer, -- graduation cohort count, example: [9, 16]\n CONSTRAINT fk_state_sector_grads_stateid FOREIGN KEY (stateid) REFERENCES state_sector_details (stateid),\n CONSTRAINT fk_state_sector_grads_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\ninstitutes refers to chronname; American Indian refers to race = 'Ai'; most number of American Indian refers to MAX(COUNT(race = 'Ai')); in 2007 refers to year = '2007';\nList the all the institutes from the state with the most number of American Indian in 2007.\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE state_sector_grads (\n stateid integer, -- example: [1, 2]\n state text, -- state name, example: ['Alabama', 'Alaska']\n state_abbr text, -- example: ['AL', 'AK']\n level text, -- example: ['4-year', '2-year']\n `year` integer, -- example: [2011, 2012]\n cohort text, -- example: ['4y bach', '4y other']\n grad_cohort text, -- graduation cohort, example: ['0', '1']\n grad_100_rate text, -- example: ['NULL', '0']\n grad_cohort_ct integer, -- graduation cohort count, example: [9, 16]\n CONSTRAINT fk_state_sector_grads_stateid FOREIGN KEY (stateid) REFERENCES state_sector_details (stateid),\n CONSTRAINT fk_state_sector_grads_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\n\nCREATE TABLE institution_details (\n unitid integer, -- Unit ID number, example: [100654, 100663]\n chronname text, -- example: ['Alabama A&M University', 'University of Alabama at Birmingham']\n city text, -- example: ['Institute', 'Normal', 'Birmingham']\n state text, -- example: ['Alabama', 'Alaska']\n level text, -- example: ['4-year', '2-year']\n site text, -- example: ['www.aamu.edu/', 'www.uab.edu']\n awards_per_value real, -- example: [14.2, 20.9]\n exp_award_natl_value integer, -- expected award national value, example: [66436, 101725]\n exp_award_percentile integer, -- example: [90, 97]\n aid_percentile integer, -- example: [72, 50]\n grad_150_value real, -- graduation 150 value, example: [29.1, 53.5]\n grad_150_percentile integer, -- graduation 150 percentile, example: [14, 66]\n pell_value real, -- example: [71.2, 35.1]\n vsa_grad_elsewhere_after6_first text, -- voluntary system of accountability graduation elsewhere after 6 year first time, example: ['5.3', '10.5']\n vsa_enroll_after6_first text, -- voluntary system of accountability enrollment after 6 year first time, example: ['12.5', '7.9']\n vsa_grad_after4_transfer text, -- voluntary system of accountability transfer after 6 year first time, example: ['15.7', 'NULL']\n vsa_grad_elsewhere_after4_transfer text, -- voluntary system of accountability graduation elsewhere after 4 year, example: ['1.5', 'NULL']\n vsa_enroll_elsewhere_after6_transfer text, -- voluntary system of accountability enrollment elsewhere after 6 years transfer, example: ['11.1', 'NULL']\n similar text, -- example: ['232937|100724|405997|113607|139533|14400', '196060|180461|201885|145600|209542|23693']\n counted_pct text, -- example: ['99.7|07', '56.0|07']\n cohort_size integer, -- example: [882, 1376]\n PRIMARY KEY (unitid)\n);\n\nCREATE TABLE institution_grads (\n unitid integer, -- example: [100760, 101028]\n `year` integer, -- example: [2011, 2012]\n gender text, -- example: ['B', 'M']\n cohort text, -- example: ['2y all', '4y other']\n grad_cohort text, -- graduation cohort, example: ['446', '185']\n grad_100 text, -- graduation 100, example: ['73', 'NULL']\n CONSTRAINT fk_institution_grads_unitid FOREIGN KEY (unitid) REFERENCES institution_details (unitid)\n);\n\nCREATE TABLE state_sector_details (\n stateid integer, -- example: [0, 1]\n state text, -- state name, example: ['United States', 'Alabama']\n level text, -- example: ['2-year', '4-year']\n control text, -- example: ['Private for-profit', 'Private not-for-profit']\n awards_per_state_value text, -- example: ['NULL', '18.8']\n exp_award_natl_value integer, -- expected award national value, example: [66436, 101725]\n PRIMARY KEY (stateid, level, control),\n CONSTRAINT fk_state_sector_details_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nname of the institutes refers to chronname; website refers to site; graduate cohort refers to grad_cohort; in 2011 refers to year = '2011';\nState the name and website of the institutes from the state with 209 graduate cohort in 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.chronname, T1.site FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2011 AND T2.grad_cohort = 209", "style": "rule" }
{ "db_id": "college_completion.sqlite", "gt_sql": "SELECT T1.chronname, T1.site FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2011 AND T2.grad_cohort = 209", "index": 1797, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE state_sector_grads (\n stateid integer, -- example: [1, 2]\n state text, -- state name, example: ['Alabama', 'Alaska']\n state_abbr text, -- example: ['AL', 'AK']\n level text, -- example: ['4-year', '2-year']\n `year` integer, -- example: [2011, 2012]\n cohort text, -- example: ['4y bach', '4y other']\n grad_cohort text, -- graduation cohort, example: ['0', '1']\n grad_100_rate text, -- example: ['NULL', '0']\n grad_cohort_ct integer, -- graduation cohort count, example: [9, 16]\n CONSTRAINT fk_state_sector_grads_stateid FOREIGN KEY (stateid) REFERENCES state_sector_details (stateid),\n CONSTRAINT fk_state_sector_grads_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\n\nCREATE TABLE institution_details (\n unitid integer, -- Unit ID number, example: [100654, 100663]\n chronname text, -- example: ['Alabama A&M University', 'University of Alabama at Birmingham']\n city text, -- example: ['Institute', 'Normal', 'Birmingham']\n state text, -- example: ['Alabama', 'Alaska']\n level text, -- example: ['4-year', '2-year']\n site text, -- example: ['www.aamu.edu/', 'www.uab.edu']\n awards_per_value real, -- example: [14.2, 20.9]\n exp_award_natl_value integer, -- expected award national value, example: [66436, 101725]\n exp_award_percentile integer, -- example: [90, 97]\n aid_percentile integer, -- example: [72, 50]\n grad_150_value real, -- graduation 150 value, example: [29.1, 53.5]\n grad_150_percentile integer, -- graduation 150 percentile, example: [14, 66]\n pell_value real, -- example: [71.2, 35.1]\n vsa_grad_elsewhere_after6_first text, -- voluntary system of accountability graduation elsewhere after 6 year first time, example: ['5.3', '10.5']\n vsa_enroll_after6_first text, -- voluntary system of accountability enrollment after 6 year first time, example: ['12.5', '7.9']\n vsa_grad_after4_transfer text, -- voluntary system of accountability transfer after 6 year first time, example: ['15.7', 'NULL']\n vsa_grad_elsewhere_after4_transfer text, -- voluntary system of accountability graduation elsewhere after 4 year, example: ['1.5', 'NULL']\n vsa_enroll_elsewhere_after6_transfer text, -- voluntary system of accountability enrollment elsewhere after 6 years transfer, example: ['11.1', 'NULL']\n similar text, -- example: ['232937|100724|405997|113607|139533|14400', '196060|180461|201885|145600|209542|23693']\n counted_pct text, -- example: ['99.7|07', '56.0|07']\n cohort_size integer, -- example: [882, 1376]\n PRIMARY KEY (unitid)\n);\n\nCREATE TABLE institution_grads (\n unitid integer, -- example: [100760, 101028]\n `year` integer, -- example: [2011, 2012]\n gender text, -- example: ['B', 'M']\n cohort text, -- example: ['2y all', '4y other']\n grad_cohort text, -- graduation cohort, example: ['446', '185']\n grad_100 text, -- graduation 100, example: ['73', 'NULL']\n CONSTRAINT fk_institution_grads_unitid FOREIGN KEY (unitid) REFERENCES institution_details (unitid)\n);\n\nCREATE TABLE state_sector_details (\n stateid integer, -- example: [0, 1]\n state text, -- state name, example: ['United States', 'Alabama']\n level text, -- example: ['2-year', '4-year']\n control text, -- example: ['Private for-profit', 'Private not-for-profit']\n awards_per_state_value text, -- example: ['NULL', '18.8']\n exp_award_natl_value integer, -- expected award national value, example: [66436, 101725]\n PRIMARY KEY (stateid, level, control),\n CONSTRAINT fk_state_sector_details_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nname of the institutes refers to chronname; website refers to site; graduate cohort refers to grad_cohort; in 2011 refers to year = '2011';\nState the name and website of the institutes from the state with 209 graduate cohort in 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", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE state_sector_grads (\n stateid integer, -- example: [1, 2]\n state text, -- state name, example: ['Alabama', 'Alaska']\n state_abbr text, -- example: ['AL', 'AK']\n control text, -- example: ['Private for-profit', 'Private not-for-profit']\n level text, -- example: ['4-year', '2-year']\n `year` integer, -- example: [2011, 2012]\n gender text, -- example: ['M', 'B', 'F']\n race text, -- example: ['A', 'Ai']\n cohort text, -- example: ['4y bach', '4y other']\n grad_cohort text, -- graduation cohort, example: ['0', '1']\n grad_100_rate text, -- example: ['NULL', '0']\n grad_cohort_ct integer, -- graduation cohort count, example: [9, 16]\n CONSTRAINT fk_state_sector_grads_stateid FOREIGN KEY (stateid) REFERENCES state_sector_details (stateid),\n CONSTRAINT fk_state_sector_grads_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\n\nCREATE TABLE institution_grads (\n unitid integer, -- example: [100760, 101028]\n `year` integer, -- example: [2011, 2012]\n gender text, -- example: ['M', 'B']\n race text, -- example: ['X', 'W']\n cohort text, -- example: ['2y all', '4y other']\n grad_cohort text, -- graduation cohort, example: ['446', '185']\n grad_100 text, -- graduation 100, example: ['73', 'NULL']\n grad_150 text, -- graduation 150, example: ['105', '40']\n CONSTRAINT fk_institution_grads_unitid FOREIGN KEY (unitid) REFERENCES institution_details (unitid)\n);\n\nCREATE TABLE state_sector_details (\n stateid integer, -- example: [0, 1]\n state text, -- state name, example: ['United States', 'Alabama']\n level text, -- example: ['2-year', '4-year']\n control text, -- example: ['Private for-profit', 'Private not-for-profit']\n counted_pct text, -- counted percentage, example: ['NULL', '61']\n awards_per_state_value text, -- example: ['NULL', '18.8']\n awards_per_natl_value real, -- awards per national value, example: [21.5, 22.5]\n exp_award_state_value text, -- expected award state value, example: ['NULL', '75743']\n exp_award_natl_value integer, -- expected award national value, example: [66436, 101725]\n state_appr_value text, -- state appropriation value, example: ['NULL', '290.68']\n state_appr_rank text, -- example: ['NULL', '11']\n grad_rate_rank text, -- example: ['23', '18']\n awards_per_rank text, -- example: ['NULL', '42']\n PRIMARY KEY (stateid, level, control),\n CONSTRAINT fk_state_sector_details_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\n\nCREATE TABLE institution_details (\n unitid integer, -- Unit ID number, example: [100654, 100663]\n city text, -- example: ['Institute', 'Normal', 'Birmingham']\n state text, -- example: ['Alabama', 'Alaska']\n level text, -- example: ['4-year', '2-year']\n control text, -- example: ['Public', 'Private not-for-profit']\n basic text, -- example: ['Masters Colleges and Universities--large', 'Research Universities--very high researc']\n hbcu text, -- Historically Black College and Universities, example: ['X', 'NULL']\n flagship text, -- example: ['NULL', 'X']\n long_x real, -- example: [-86.568502, -86.80917]\n lat_y real, -- example: [34.783368, 33.50223]\n student_count integer, -- example: [4051, 11502]\n awards_per_value real, -- example: [14.2, 20.9]\n awards_per_state_value real, -- example: [18.8, 17.8]\n awards_per_natl_value real, -- awards per national value, example: [21.5, 22.5]\n exp_award_value integer, -- expected award value, example: [105331, 136546]\n exp_award_state_value integer, -- expected award state value, example: [75743, 92268]\n exp_award_natl_value integer, -- expected award national value, example: [66436, 101725]\n exp_award_percentile integer, -- example: [90, 97]\n ft_pct real, -- Full-time percentage, example: [93.8, 72.7]\n fte_value integer, -- Full-time percentage, example: [3906, 10032]\n med_sat_value text, -- median SAT value, example: ['823', '1146']\n med_sat_percentile text, -- median SAT percentile, example: ['0', '84']\n aid_value integer, -- example: [7142, 6088]\n aid_percentile integer, -- example: [72, 50]\n endow_value text, -- example: ['NULL', '24136']\n grad_100_value real, -- graduation 100 value, example: [10.0, 29.4]\n grad_100_percentile integer, -- graduation 100 percentile, example: [15, 67]\n grad_150_value real, -- graduation 150 value, example: [29.1, 53.5]\n pell_value real, -- example: [71.2, 35.1]\n pell_percentile integer, -- example: [98, 39]\n retain_value real, -- example: [63.1, 80.2]\n retain_percentile integer, -- example: [17, 70]\n ft_fac_percentile integer, -- full time faculty percentile, example: [89, 98]\n vsa_grad_after4_first text, -- voluntary system of accountability after 4 year first time, example: ['14.7', '22.3']\n vsa_grad_elsewhere_after4_first text, -- voluntary system of accountability graduation elsewhere after 4 year first time, example: ['2', '2.9']\n vsa_enroll_after4_first text, -- voluntary system of accountability enrollment after 4 year first time, example: ['36.5', '34.2']\n vsa_enroll_elsewhere_after4_first text, -- voluntary system of accountability enrollment elsewhere after 4 year first time, example: ['16.1', '19.2']\n vsa_grad_elsewhere_after6_first text, -- voluntary system of accountability graduation elsewhere after 6 year first time, example: ['5.3', '10.5']\n vsa_enroll_after6_first text, -- voluntary system of accountability enrollment after 6 year first time, example: ['12.5', '7.9']\n vsa_enroll_elsewhere_after6_first text, -- voluntary system of accountability enrollment elsewhere after 6 year first time, example: ['14.6', '13.1']\n vsa_grad_elsewhere_after4_transfer text, -- voluntary system of accountability graduation elsewhere after 4 year, example: ['1.5', 'NULL']\n vsa_enroll_after4_transfer text, -- voluntary system of accountability enrollment after 4 years transfer, example: ['40.9', 'NULL']\n vsa_enroll_elsewhere_after4_transfer text, -- voluntary system of accountability enrollment elsewhere after 4 years transfer, example: ['17.2', 'NULL']\n vsa_grad_after6_transfer text, -- voluntary system of accountability enrollment elsewhere after 6 years transfer, example: ['36.4', 'NULL']\n vsa_grad_elsewhere_after6_transfer text, -- voluntary system of accountability graduation elsewhere after 6 years transfer, example: ['5.6', 'NULL']\n vsa_enroll_after6_transfer text, -- voluntary system of accountability enrollment after 6 years transfer, example: ['17.2', 'NULL']\n similar text, -- example: ['232937|100724|405997|113607|139533|14400', '196060|180461|201885|145600|209542|23693']\n state_sector_ct integer, -- example: [13, 16]\n carnegie_ct integer, -- example: [386, 106]\n counted_pct text, -- example: ['99.7|07', '56.0|07']\n nicknames text, -- example: ['NULL', 'UAB']\n cohort_size integer, -- example: [882, 1376]\n PRIMARY KEY (unitid)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nmale refers to gender = 'M'; graduates refers to grad_cohort; in 2012 refers to year = 2012; highest average amount of student aid going to undergraduate recipients refers to MAX(aid_value);\nWhat is the total male graduates in 2012 in the state whereby the institute with the highest average amount of student aid going to undergraduate recipients is located?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT COUNT(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2012 AND T2.gender = 'M' ORDER BY T1.aid_value DESC LIMIT 1", "style": "rule" }
{ "db_id": "college_completion.sqlite", "gt_sql": "SELECT COUNT(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2012 AND T2.gender = 'M' ORDER BY T1.aid_value DESC LIMIT 1", "index": 1798, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE state_sector_grads (\n stateid integer, -- example: [1, 2]\n state text, -- state name, example: ['Alabama', 'Alaska']\n state_abbr text, -- example: ['AL', 'AK']\n control text, -- example: ['Private for-profit', 'Private not-for-profit']\n level text, -- example: ['4-year', '2-year']\n `year` integer, -- example: [2011, 2012]\n gender text, -- example: ['M', 'B', 'F']\n race text, -- example: ['A', 'Ai']\n cohort text, -- example: ['4y bach', '4y other']\n grad_cohort text, -- graduation cohort, example: ['0', '1']\n grad_100_rate text, -- example: ['NULL', '0']\n grad_cohort_ct integer, -- graduation cohort count, example: [9, 16]\n CONSTRAINT fk_state_sector_grads_stateid FOREIGN KEY (stateid) REFERENCES state_sector_details (stateid),\n CONSTRAINT fk_state_sector_grads_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\n\nCREATE TABLE institution_grads (\n unitid integer, -- example: [100760, 101028]\n `year` integer, -- example: [2011, 2012]\n gender text, -- example: ['M', 'B']\n race text, -- example: ['X', 'W']\n cohort text, -- example: ['2y all', '4y other']\n grad_cohort text, -- graduation cohort, example: ['446', '185']\n grad_100 text, -- graduation 100, example: ['73', 'NULL']\n grad_150 text, -- graduation 150, example: ['105', '40']\n CONSTRAINT fk_institution_grads_unitid FOREIGN KEY (unitid) REFERENCES institution_details (unitid)\n);\n\nCREATE TABLE state_sector_details (\n stateid integer, -- example: [0, 1]\n state text, -- state name, example: ['United States', 'Alabama']\n level text, -- example: ['2-year', '4-year']\n control text, -- example: ['Private for-profit', 'Private not-for-profit']\n counted_pct text, -- counted percentage, example: ['NULL', '61']\n awards_per_state_value text, -- example: ['NULL', '18.8']\n awards_per_natl_value real, -- awards per national value, example: [21.5, 22.5]\n exp_award_state_value text, -- expected award state value, example: ['NULL', '75743']\n exp_award_natl_value integer, -- expected award national value, example: [66436, 101725]\n state_appr_value text, -- state appropriation value, example: ['NULL', '290.68']\n state_appr_rank text, -- example: ['NULL', '11']\n grad_rate_rank text, -- example: ['23', '18']\n awards_per_rank text, -- example: ['NULL', '42']\n PRIMARY KEY (stateid, level, control),\n CONSTRAINT fk_state_sector_details_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\n\nCREATE TABLE institution_details (\n unitid integer, -- Unit ID number, example: [100654, 100663]\n city text, -- example: ['Institute', 'Normal', 'Birmingham']\n state text, -- example: ['Alabama', 'Alaska']\n level text, -- example: ['4-year', '2-year']\n control text, -- example: ['Public', 'Private not-for-profit']\n basic text, -- example: ['Masters Colleges and Universities--large', 'Research Universities--very high researc']\n hbcu text, -- Historically Black College and Universities, example: ['X', 'NULL']\n flagship text, -- example: ['NULL', 'X']\n long_x real, -- example: [-86.568502, -86.80917]\n lat_y real, -- example: [34.783368, 33.50223]\n student_count integer, -- example: [4051, 11502]\n awards_per_value real, -- example: [14.2, 20.9]\n awards_per_state_value real, -- example: [18.8, 17.8]\n awards_per_natl_value real, -- awards per national value, example: [21.5, 22.5]\n exp_award_value integer, -- expected award value, example: [105331, 136546]\n exp_award_state_value integer, -- expected award state value, example: [75743, 92268]\n exp_award_natl_value integer, -- expected award national value, example: [66436, 101725]\n exp_award_percentile integer, -- example: [90, 97]\n ft_pct real, -- Full-time percentage, example: [93.8, 72.7]\n fte_value integer, -- Full-time percentage, example: [3906, 10032]\n med_sat_value text, -- median SAT value, example: ['823', '1146']\n med_sat_percentile text, -- median SAT percentile, example: ['0', '84']\n aid_value integer, -- example: [7142, 6088]\n aid_percentile integer, -- example: [72, 50]\n endow_value text, -- example: ['NULL', '24136']\n grad_100_value real, -- graduation 100 value, example: [10.0, 29.4]\n grad_100_percentile integer, -- graduation 100 percentile, example: [15, 67]\n grad_150_value real, -- graduation 150 value, example: [29.1, 53.5]\n pell_value real, -- example: [71.2, 35.1]\n pell_percentile integer, -- example: [98, 39]\n retain_value real, -- example: [63.1, 80.2]\n retain_percentile integer, -- example: [17, 70]\n ft_fac_percentile integer, -- full time faculty percentile, example: [89, 98]\n vsa_grad_after4_first text, -- voluntary system of accountability after 4 year first time, example: ['14.7', '22.3']\n vsa_grad_elsewhere_after4_first text, -- voluntary system of accountability graduation elsewhere after 4 year first time, example: ['2', '2.9']\n vsa_enroll_after4_first text, -- voluntary system of accountability enrollment after 4 year first time, example: ['36.5', '34.2']\n vsa_enroll_elsewhere_after4_first text, -- voluntary system of accountability enrollment elsewhere after 4 year first time, example: ['16.1', '19.2']\n vsa_grad_elsewhere_after6_first text, -- voluntary system of accountability graduation elsewhere after 6 year first time, example: ['5.3', '10.5']\n vsa_enroll_after6_first text, -- voluntary system of accountability enrollment after 6 year first time, example: ['12.5', '7.9']\n vsa_enroll_elsewhere_after6_first text, -- voluntary system of accountability enrollment elsewhere after 6 year first time, example: ['14.6', '13.1']\n vsa_grad_elsewhere_after4_transfer text, -- voluntary system of accountability graduation elsewhere after 4 year, example: ['1.5', 'NULL']\n vsa_enroll_after4_transfer text, -- voluntary system of accountability enrollment after 4 years transfer, example: ['40.9', 'NULL']\n vsa_enroll_elsewhere_after4_transfer text, -- voluntary system of accountability enrollment elsewhere after 4 years transfer, example: ['17.2', 'NULL']\n vsa_grad_after6_transfer text, -- voluntary system of accountability enrollment elsewhere after 6 years transfer, example: ['36.4', 'NULL']\n vsa_grad_elsewhere_after6_transfer text, -- voluntary system of accountability graduation elsewhere after 6 years transfer, example: ['5.6', 'NULL']\n vsa_enroll_after6_transfer text, -- voluntary system of accountability enrollment after 6 years transfer, example: ['17.2', 'NULL']\n similar text, -- example: ['232937|100724|405997|113607|139533|14400', '196060|180461|201885|145600|209542|23693']\n state_sector_ct integer, -- example: [13, 16]\n carnegie_ct integer, -- example: [386, 106]\n counted_pct text, -- example: ['99.7|07', '56.0|07']\n nicknames text, -- example: ['NULL', 'UAB']\n cohort_size integer, -- example: [882, 1376]\n PRIMARY KEY (unitid)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nmale refers to gender = 'M'; graduates refers to grad_cohort; in 2012 refers to year = 2012; highest average amount of student aid going to undergraduate recipients refers to MAX(aid_value);\nWhat is the total male graduates in 2012 in the state whereby the institute with the highest average amount of student aid going to undergraduate recipients is located?\n\nInstructions:\n- Make sure you only output the information that is asked in the question. If the question asks for a specific column, make sure to only include that column in the SELECT clause, nothing more.\n- The generated query should return all of the information asked in the question without any missing or extra information.\n- Before generating the final SQL query, please think through the steps of how to write the query.\n\nOutput Format:\nIn your answer, please enclose the generated SQL query in a code block:\n```sql\n-- Your SQL query\n```\n\nTake a deep breath and think step by step to find the correct SQL query.\n", "split": "train" }
nl2sql
[ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE state_sector_grads (\n stateid integer, -- example: [1, 2]\n state text, -- state name, example: ['Alabama', 'Alaska']\n control text, -- example: ['Private for-profit', 'Private not-for-profit']\n `year` integer, -- example: [2011, 2012]\n cohort text, -- example: ['4y bach', '4y other']\n grad_cohort text, -- graduation cohort, example: ['0', '1']\n grad_100_rate text, -- example: ['NULL', '0']\n CONSTRAINT fk_state_sector_grads_stateid FOREIGN KEY (stateid) REFERENCES state_sector_details (stateid),\n CONSTRAINT fk_state_sector_grads_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\n\nCREATE TABLE state_sector_details (\n stateid integer, -- example: [0, 1]\n state text, -- state name, example: ['United States', 'Alabama']\n level text, -- example: ['2-year', '4-year']\n control text, -- example: ['Private for-profit', 'Private not-for-profit']\n exp_award_natl_value integer, -- expected award national value, example: [66436, 101725]\n PRIMARY KEY (stateid, level, control),\n CONSTRAINT fk_state_sector_details_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\n\nCREATE TABLE institution_grads (\n unitid integer, -- example: [100760, 101028]\n `year` integer, -- example: [2011, 2012]\n cohort text, -- example: ['2y all', '4y other']\n grad_cohort text, -- graduation cohort, example: ['446', '185']\n grad_100 text, -- graduation 100, example: ['73', 'NULL']\n CONSTRAINT fk_institution_grads_unitid FOREIGN KEY (unitid) REFERENCES institution_details (unitid)\n);\n\nCREATE TABLE institution_details (\n unitid integer, -- Unit ID number, example: [100654, 100663]\n chronname text, -- example: ['Alabama A&M University', 'University of Alabama at Birmingham']\n state text, -- example: ['Alabama', 'Alaska']\n level text, -- example: ['4-year', '2-year']\n control text, -- example: ['Private for-profit', 'Public', 'Private not-for-profit']\n hbcu text, -- Historically Black College and Universities, example: ['X', 'NULL']\n lat_y real, -- example: [34.783368, 33.50223]\n site text, -- example: ['www.aamu.edu/', 'www.uab.edu']\n awards_per_natl_value real, -- awards per national value, example: [21.5, 22.5]\n exp_award_natl_value integer, -- expected award national value, example: [66436, 101725]\n aid_value integer, -- example: [7142, 6088]\n pell_value real, -- example: [71.2, 35.1]\n pell_percentile integer, -- example: [98, 39]\n ft_fac_percentile integer, -- full time faculty percentile, example: [89, 98]\n vsa_grad_after4_first text, -- voluntary system of accountability after 4 year first time, example: ['14.7', '22.3']\n vsa_enroll_elsewhere_after4_first text, -- voluntary system of accountability enrollment elsewhere after 4 year first time, example: ['16.1', '19.2']\n vsa_grad_after6_first text, -- voluntary system of accountability graduation elsewhere after 6 year first time, example: ['33', '42.6']\n PRIMARY KEY (unitid)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nmost number of graduate cohort refers to MAX(SUM(grad_cohort)); in 2012 refers to year = 2012; private institute for profit refers to control = 'Private for-profit'; institutes refers to chronname;\nName the state with the most number of graduate cohort in 2012 from private institute for profit? List all such institutes in the mentioned 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", "role": "user" } ]
nl2sql
{ "ground_truth": "SELECT T1.state, T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2012 AND T1.control = 'Private for-profit' GROUP BY T2.grad_cohort ORDER BY COUNT(T2.grad_cohort) DESC LIMIT 1", "style": "rule" }
{ "db_id": "college_completion.sqlite", "gt_sql": "SELECT T1.state, T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2012 AND T1.control = 'Private for-profit' GROUP BY T2.grad_cohort ORDER BY COUNT(T2.grad_cohort) DESC LIMIT 1", "index": 1799, "question": "Task Overview:\nYou are a data science expert. Below, you are provided with a database schema and a natural language question. Your task is to understand the schema and generate a valid SQL query to answer the question.\n\nDatabase Engine:\nSQLite\n\nDatabase Schema:\nCREATE TABLE state_sector_grads (\n stateid integer, -- example: [1, 2]\n state text, -- state name, example: ['Alabama', 'Alaska']\n control text, -- example: ['Private for-profit', 'Private not-for-profit']\n `year` integer, -- example: [2011, 2012]\n cohort text, -- example: ['4y bach', '4y other']\n grad_cohort text, -- graduation cohort, example: ['0', '1']\n grad_100_rate text, -- example: ['NULL', '0']\n CONSTRAINT fk_state_sector_grads_stateid FOREIGN KEY (stateid) REFERENCES state_sector_details (stateid),\n CONSTRAINT fk_state_sector_grads_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\n\nCREATE TABLE state_sector_details (\n stateid integer, -- example: [0, 1]\n state text, -- state name, example: ['United States', 'Alabama']\n level text, -- example: ['2-year', '4-year']\n control text, -- example: ['Private for-profit', 'Private not-for-profit']\n exp_award_natl_value integer, -- expected award national value, example: [66436, 101725]\n PRIMARY KEY (stateid, level, control),\n CONSTRAINT fk_state_sector_details_state FOREIGN KEY (state) REFERENCES institution_details (state)\n);\n\nCREATE TABLE institution_grads (\n unitid integer, -- example: [100760, 101028]\n `year` integer, -- example: [2011, 2012]\n cohort text, -- example: ['2y all', '4y other']\n grad_cohort text, -- graduation cohort, example: ['446', '185']\n grad_100 text, -- graduation 100, example: ['73', 'NULL']\n CONSTRAINT fk_institution_grads_unitid FOREIGN KEY (unitid) REFERENCES institution_details (unitid)\n);\n\nCREATE TABLE institution_details (\n unitid integer, -- Unit ID number, example: [100654, 100663]\n chronname text, -- example: ['Alabama A&M University', 'University of Alabama at Birmingham']\n state text, -- example: ['Alabama', 'Alaska']\n level text, -- example: ['4-year', '2-year']\n control text, -- example: ['Private for-profit', 'Public', 'Private not-for-profit']\n hbcu text, -- Historically Black College and Universities, example: ['X', 'NULL']\n lat_y real, -- example: [34.783368, 33.50223]\n site text, -- example: ['www.aamu.edu/', 'www.uab.edu']\n awards_per_natl_value real, -- awards per national value, example: [21.5, 22.5]\n exp_award_natl_value integer, -- expected award national value, example: [66436, 101725]\n aid_value integer, -- example: [7142, 6088]\n pell_value real, -- example: [71.2, 35.1]\n pell_percentile integer, -- example: [98, 39]\n ft_fac_percentile integer, -- full time faculty percentile, example: [89, 98]\n vsa_grad_after4_first text, -- voluntary system of accountability after 4 year first time, example: ['14.7', '22.3']\n vsa_enroll_elsewhere_after4_first text, -- voluntary system of accountability enrollment elsewhere after 4 year first time, example: ['16.1', '19.2']\n vsa_grad_after6_first text, -- voluntary system of accountability graduation elsewhere after 6 year first time, example: ['33', '42.6']\n PRIMARY KEY (unitid)\n);\nThis schema describes the database's structure, including tables, columns, primary keys, foreign keys, and any relevant relationships or constraints.\n\nQuestion:\nmost number of graduate cohort refers to MAX(SUM(grad_cohort)); in 2012 refers to year = 2012; private institute for profit refers to control = 'Private for-profit'; institutes refers to chronname;\nName the state with the most number of graduate cohort in 2012 from private institute for profit? List all such institutes in the mentioned 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", "split": "train" }