{"id": "spider_train_00016", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "How many farms are there?", "sql": "SELECT COUNT(*) FROM farm;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00017", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Count the number of farms.", "sql": "SELECT COUNT(*) FROM farm;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00018", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "List the total number of horses on farms in ascending order.", "sql": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00019", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What is the total horses record for each farm, sorted ascending?", "sql": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00020", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What are the hosts of competitions whose theme is not \"Aliens\"?", "sql": "SELECT Hosts FROM farm_competition WHERE Theme <> 'Aliens';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00021", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Return the hosts of competitions for which the theme is not Aliens?", "sql": "SELECT Hosts FROM farm_competition WHERE Theme <> 'Aliens';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00022", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What are the themes of farm competitions sorted by year in ascending order?", "sql": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00023", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Return the themes of farm competitions, sorted by year ascending.", "sql": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00024", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What is the average number of working horses of farms with more than 5000 total number of horses?", "sql": "SELECT AVG(Working_Horses) FROM farm WHERE Total_Horses > 5000;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00025", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Give the average number of working horses on farms with more than 5000 total horses.", "sql": "SELECT AVG(Working_Horses) FROM farm WHERE Total_Horses > 5000;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00026", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What are the maximum and minimum number of cows across all farms.", "sql": "SELECT MAX(Cows), MIN(Cows) FROM farm;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00027", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Return the maximum and minimum number of cows across all farms.", "sql": "SELECT MAX(Cows), MIN(Cows) FROM farm;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00028", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "How many different statuses do cities have?", "sql": "SELECT COUNT(DISTINCT Status) FROM city;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00029", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Count the number of different statuses.", "sql": "SELECT COUNT(DISTINCT Status) FROM city;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00030", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "List official names of cities in descending order of population.", "sql": "SELECT Official_Name FROM city ORDER BY Population DESC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00031", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What are the official names of cities, ordered descending by population?", "sql": "SELECT Official_Name FROM city ORDER BY Population DESC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00032", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "List the official name and status of the city with the largest population.", "sql": "SELECT Official_Name, Status FROM city ORDER BY Population DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00033", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What is the official name and status of the city with the most residents?", "sql": "SELECT Official_Name, Status FROM city ORDER BY Population DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00034", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Show the years and the official names of the host cities of competitions.", "sql": "SELECT T2.Year, T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00035", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Give the years and official names of the cities of each competition.", "sql": "SELECT T2.Year, T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00036", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Show the official names of the cities that have hosted more than one competition.", "sql": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID, T1.Official_Name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00037", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What are the official names of cities that have hosted more than one competition?", "sql": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID, T1.Official_Name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00038", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Show the status of the city that has hosted the greatest number of competitions.", "sql": "SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID, T1.Status ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00039", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What is the status of the city that has hosted the most competitions?", "sql": "SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID, T1.Status ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00040", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Please show the themes of competitions with host cities having populations larger than 1000.", "sql": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00041", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What are the themes of competitions that have corresponding host cities with more than 1000 residents?", "sql": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00042", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Please show the different statuses of cities and the average population of cities with each status.", "sql": "SELECT Status, AVG(Population) FROM city GROUP BY Status;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00043", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What are the statuses and average populations of each city?", "sql": "SELECT Status, AVG(Population) FROM city GROUP BY Status;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00044", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Please show the different statuses, ordered by the number of cities that have each.", "sql": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00045", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Return the different statuses of cities, ascending by frequency.", "sql": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00046", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "List the most common type of Status across cities.", "sql": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00047", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What is the most common status across all cities?", "sql": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00048", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "List the official names of cities that have not held any competition.", "sql": "SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00049", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What are the official names of cities that have not hosted a farm competition?", "sql": "SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00050", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Show the status shared by cities with population bigger than 1500 and smaller than 500.", "sql": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00051", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500?", "sql": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00052", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Find the official names of cities with population bigger than 1500 or smaller than 500.", "sql": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00053", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What are the official names of cities that have population over 1500 or less than 500?", "sql": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00054", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "Show the census ranking of cities whose status are not \"Village\".", "sql": "SELECT Census_Ranking FROM city WHERE Status <> 'Village';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00055", "db_id": "farm", "schema_text": "CREATE TABLE city (City_ID BIGINT, Official_Name VARCHAR /* e.g. 'Aroostook', 'Drummond' */, Status VARCHAR /* e.g. 'Village', 'Town' */, Area_km_2 DOUBLE, Population DOUBLE, Census_Ranking VARCHAR /* e.g. '1442 of 5,008', '1936 of 5,008' */);\nCREATE TABLE competition_record (Competition_ID BIGINT, Farm_ID BIGINT, Rank BIGINT);\nCREATE TABLE farm (Farm_ID BIGINT, Year BIGINT, Total_Horses DOUBLE, Working_Horses DOUBLE, Total_Cattle DOUBLE, Oxen DOUBLE, Bulls DOUBLE, Cows DOUBLE, Pigs DOUBLE, Sheep_and_Goats DOUBLE);\nCREATE TABLE farm_competition (Competition_ID BIGINT, Year BIGINT, Theme VARCHAR /* e.g. 'Aliens', 'Carnival M is back!' */, Host_city_ID BIGINT, Hosts VARCHAR /* e.g. 'Alicia Keys', 'Leehom Wang and Kelly Rowland' */);", "question": "What are the census rankings of cities that do not have the status \"Village\"?", "sql": "SELECT Census_Ranking FROM city WHERE Status <> 'Village';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00111", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the names of stations that have latitude lower than 37.5?", "sql": "SELECT name FROM station WHERE lat < 37.5;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00112", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the names of all stations with a latitude smaller than 37.5?", "sql": "SELECT name FROM station WHERE lat < 37.5;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00113", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "For each city, return the highest latitude among its stations.", "sql": "SELECT city, MAX(lat) FROM station GROUP BY city;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00114", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "For each city, what is the highest latitude for its stations?", "sql": "SELECT city, MAX(lat) FROM station GROUP BY city;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00115", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "Give me the start station and end station for the trips with the three oldest id.", "sql": "SELECT start_station_name, end_station_name FROM trip ORDER BY id LIMIT 3;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00116", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the station station and end station for the trips with the three smallest ids?", "sql": "SELECT start_station_name, end_station_name FROM trip ORDER BY id LIMIT 3;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00117", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the average latitude and longitude of stations located in San Jose city?", "sql": "SELECT AVG(lat), AVG(long) FROM station WHERE city = 'San Jose';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00118", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the average latitude and longitude in San Jose?", "sql": "SELECT AVG(lat), AVG(long) FROM station WHERE city = 'San Jose';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00119", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the id of the trip that has the shortest duration?", "sql": "SELECT id FROM trip ORDER BY duration LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00120", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the id of the shortest trip?", "sql": "SELECT id FROM trip ORDER BY duration LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00121", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the total and maximum duration of trips with bike id 636?", "sql": "SELECT SUM(duration), MAX(duration) FROM trip WHERE bike_id = 636;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00122", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the total and maximum duration for all trips with the bike id 636?", "sql": "SELECT SUM(duration), MAX(duration) FROM trip WHERE bike_id = 636;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00125", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "From the trip record, find the number of unique bikes.", "sql": "SELECT COUNT(DISTINCT bike_id) FROM trip;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00126", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "How many different bike ids are there?", "sql": "SELECT COUNT(DISTINCT bike_id) FROM trip;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00127", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the number of distinct cities the stations are located at?", "sql": "SELECT COUNT(DISTINCT city) FROM station;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00128", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "How many different cities have these stations?", "sql": "SELECT COUNT(DISTINCT city) FROM station;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00129", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "How many stations does Mountain View city has?", "sql": "SELECT COUNT(*) FROM station WHERE city = 'Mountain View';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00130", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "How many stations are in Mountain View?", "sql": "SELECT COUNT(*) FROM station WHERE city = 'Mountain View';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00131", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "Return the unique name for stations that have ever had 7 bikes available.", "sql": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00132", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the different names for each station that has ever had 7 bikes available?", "sql": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00133", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "Which start station had the most trips starting from August? Give me the name and id of the station.", "sql": "SELECT start_station_name, start_station_id FROM trip WHERE start_date ILIKE '8/%' GROUP BY start_station_name, start_station_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00134", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the start station's name and id for the one that had the most start trips in August?", "sql": "SELECT start_station_name, start_station_id FROM trip WHERE start_date ILIKE '8/%' GROUP BY start_station_name, start_station_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00139", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the latitude, longitude, city of the station from which the shortest trip started?", "sql": "SELECT T1.lat, T1.long, T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00140", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the latitude, longitude, and city of the station from which the trip with smallest duration started?", "sql": "SELECT T1.lat, T1.long, T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00141", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the ids of stations that are located in San Francisco and have average bike availability above 10.", "sql": "SELECT id FROM station WHERE city = 'San Francisco' INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00142", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the ids of the stations in San Francisco that normally have more than 10 bikes available?", "sql": "SELECT id FROM station WHERE city = 'San Francisco' INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00143", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the names and ids of stations that had more than 14 bikes available on average or were installed in December?", "sql": "SELECT T1.name, T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id, T1.name, T1.id HAVING AVG(T2.bikes_available) > 14 UNION SELECT name, id FROM station WHERE installation_date ILIKE '12/%';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00144", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the names and ids of all stations that have more than 14 bikes available on average or had bikes installed in December?", "sql": "SELECT T1.name, T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id, T1.name, T1.id HAVING AVG(T2.bikes_available) > 14 UNION SELECT name, id FROM station WHERE installation_date ILIKE '12/%';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00145", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the 3 most common cloud cover rates in the region of zip code 94107?", "sql": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT(*) DESC LIMIT 3;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00146", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the 3 most common cloud covers in the zip code of 94107?", "sql": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT(*) DESC LIMIT 3;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00149", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the average bike availability in stations that are not located in Palo Alto?", "sql": "SELECT AVG(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city = 'Palo Alto');", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00150", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the average bike availablility for stations not in Palo Alto?", "sql": "SELECT AVG(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city = 'Palo Alto');", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00151", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the average longitude of stations that never had bike availability more than 10?", "sql": "SELECT AVG(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING MAX(bikes_available) > 10);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00152", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the mean longitude for all stations that have never had more than 10 bikes available?", "sql": "SELECT AVG(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING MAX(bikes_available) > 10);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00159", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "On which day and in which zip code was the min dew point lower than any day in zip code 94107?", "sql": "SELECT date, zip_code FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00160", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "Which days had a minimum dew point smaller than any day in zip code 94107, and in which zip codes were those measurements taken?", "sql": "SELECT date, zip_code FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00161", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "For each trip, return its ending station's installation date.", "sql": "SELECT T1.id, T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00162", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the installation date for each ending station on all the trips?", "sql": "SELECT T1.id, T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00163", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "Which trip started from the station with the largest dock count? Give me the trip id.", "sql": "SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00164", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the id of the trip that started from the station with the highest dock count?", "sql": "SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00165", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "Count the number of trips that did not end in San Francisco city.", "sql": "SELECT COUNT(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city <> 'San Francisco';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00166", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "How many trips did not end in San Francisco?", "sql": "SELECT COUNT(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city <> 'San Francisco';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00167", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "In zip code 94107, on which day neither Fog nor Rain was not observed?", "sql": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS <> 'Fog' AND EVENTS <> 'Rain';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00168", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "On which day has it neither been foggy nor rained in the zip code of 94107?", "sql": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS <> 'Fog' AND EVENTS <> 'Rain';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00169", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the ids of stations that have latitude above 37.4 and never had bike availability below 7?", "sql": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING MIN(bikes_available) < 7;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00170", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available?", "sql": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING MIN(bikes_available) < 7;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00171", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are names of stations that have average bike availability above 10 and are not located in San Jose city?", "sql": "SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id, T1.name HAVING AVG(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = 'San Jose';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00172", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the names of all stations that have more than 10 bikes available and are not located in San Jose?", "sql": "SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id, T1.name HAVING AVG(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = 'San Jose';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00173", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the name, latitude, and city of the station with the lowest latitude?", "sql": "SELECT name, lat, city FROM station ORDER BY lat LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00174", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the name, latitude, and city of the station that is located the furthest South?", "sql": "SELECT name, lat, city FROM station ORDER BY lat LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00177", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "List the name and the number of stations for all the cities that have at least 15 stations.", "sql": "SELECT city, COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00178", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the name of every city that has at least 15 stations and how many stations does it have?", "sql": "SELECT city, COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00179", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "Find the ids and names of stations from which at least 200 trips started.", "sql": "SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name, start_station_id HAVING COUNT(*) >= 200;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00180", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the ids and names of all start stations that were the beginning of at least 200 trips?", "sql": "SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name, start_station_id HAVING COUNT(*) >= 200;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00181", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "Find the zip code in which the average mean visibility is lower than 10.", "sql": "SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_visibility_miles) < 10;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00182", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "For each zip code, select all those that have an average mean visiblity below 10.", "sql": "SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_visibility_miles) < 10;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00183", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "List all the cities in a decreasing order of each city's stations' highest latitude.", "sql": "SELECT city FROM station GROUP BY city ORDER BY MAX(lat) DESC;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00184", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "For each city, list their names in decreasing order by their highest station latitude.", "sql": "SELECT city FROM station GROUP BY city ORDER BY MAX(lat) DESC;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00187", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the ids and durations of the trips with the top 3 durations?", "sql": "SELECT id, duration FROM trip ORDER BY duration DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00188", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the ids of the trips that lasted the longest and how long did they last?", "sql": "SELECT id, duration FROM trip ORDER BY duration DESC LIMIT 3;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00189", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "For each station, return its longitude and the average duration of trips that started from the station.", "sql": "SELECT T1.name, T1.long, AVG(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id, T1.name, T1.long;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00190", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "For each start station id, what is its name, longitude and average duration of trips started there?", "sql": "SELECT T1.name, T1.long, AVG(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id, T1.name, T1.long;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00191", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "For each station, find its latitude and the minimum duration of trips that ended at the station.", "sql": "SELECT T1.name, T1.lat, MIN(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id, T1.name, T1.lat;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00192", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "For each end station id, what is its name, latitude, and minimum duration for trips ended there?", "sql": "SELECT T1.name, T1.lat, MIN(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id, T1.name, T1.lat;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00193", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "List all the distinct stations from which a trip of duration below 100 started.", "sql": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00194", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are all the different start station names for a trip that lasted less than 100?", "sql": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00199", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the dates in which the mean sea level pressure was between 30.3 and 31?", "sql": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00200", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the dates that have an average sea level pressure between 30.3 and 31?", "sql": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00201", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.", "sql": "SELECT date, max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00202", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the days that had the smallest temperature range, and what was that range?", "sql": "SELECT date, max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00203", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the id and name of the stations that have ever had more than 12 bikes available?", "sql": "SELECT DISTINCT T1.id, T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00204", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the different ids and names of the stations that have had more than 12 bikes available?", "sql": "SELECT DISTINCT T1.id, T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00205", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "Give me the zip code where the average mean humidity is below 70 and at least 100 trips took place.", "sql": "SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_humidity) < 70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING COUNT(*) >= 100;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00206", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there?", "sql": "SELECT zip_code FROM weather GROUP BY zip_code HAVING AVG(mean_humidity) < 70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING COUNT(*) >= 100;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00207", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times?", "sql": "SELECT name FROM station WHERE city = 'Palo Alto' EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING COUNT(*) > 100;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00208", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What are the names of the stations that are located in Palo Alto but have never been the ending point of the trips", "sql": "SELECT name FROM station WHERE city = 'Palo Alto' EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING COUNT(*) > 100;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00209", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "How many trips started from Mountain View city and ended at Palo Alto city?", "sql": "SELECT COUNT(*) FROM station AS T1 JOIN trip AS T2 ON TRUE JOIN station AS T3 ON TRUE JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = 'Mountain View' AND T3.city = 'Palo Alto';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00210", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "How many trips stated from a station in Mountain View and ended at one in Palo Alto?", "sql": "SELECT COUNT(*) FROM station AS T1 JOIN trip AS T2 ON TRUE JOIN station AS T3 ON TRUE JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = 'Mountain View' AND T3.city = 'Palo Alto';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00211", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the average latitude and longitude of the starting points of all trips?", "sql": "SELECT AVG(T1.lat), AVG(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00212", "db_id": "bike_1", "schema_text": "CREATE TABLE station (id BIGINT, name VARCHAR, lat DOUBLE, long DOUBLE, dock_count BIGINT, city VARCHAR /* e.g. 'San Francisco', 'San Jose' */, installation_date VARCHAR /* e.g. '8/23/2013', '8/19/2013' */);\nCREATE TABLE status (station_id BIGINT, bikes_available BIGINT, docks_available BIGINT, time VARCHAR);\nCREATE TABLE trip (id BIGINT, duration BIGINT, start_date VARCHAR, start_station_name VARCHAR, start_station_id BIGINT, end_date VARCHAR, end_station_name VARCHAR, end_station_id BIGINT, bike_id BIGINT, subscription_type VARCHAR /* e.g. 'Subscriber', 'Customer' */, zip_code VARCHAR);\nCREATE TABLE weather (date VARCHAR, max_temperature_f BIGINT, mean_temperature_f BIGINT, min_temperature_f BIGINT, max_dew_point_f BIGINT, mean_dew_point_f BIGINT, min_dew_point_f BIGINT, max_humidity BIGINT, mean_humidity BIGINT, min_humidity BIGINT, max_sea_level_pressure_inches DOUBLE, mean_sea_level_pressure_inches DOUBLE, min_sea_level_pressure_inches DOUBLE, max_visibility_miles BIGINT, mean_visibility_miles BIGINT, min_visibility_miles BIGINT, max_wind_Speed_mph BIGINT, mean_wind_speed_mph BIGINT, max_gust_speed_mph BIGINT, precipitation_inches VARCHAR, cloud_cover BIGINT, events VARCHAR /* e.g. 'Rain', 'Fog' */, wind_dir_degrees BIGINT, zip_code BIGINT);", "question": "What is the average latitude and longitude of all starting stations for the trips?", "sql": "SELECT AVG(T1.lat), AVG(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00343", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "How many aircrafts do we have?", "sql": "SELECT COUNT(*) FROM Aircraft;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00344", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "How many aircrafts exist in the database?", "sql": "SELECT COUNT(*) FROM Aircraft;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00345", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show name and distance for all aircrafts.", "sql": "SELECT name, distance FROM Aircraft;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00346", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the names and distances for all airplanes?", "sql": "SELECT name, distance FROM Aircraft;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00347", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show ids for all aircrafts with more than 1000 distance.", "sql": "SELECT aid FROM Aircraft WHERE distance > 1000;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00348", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the ids of all aircrafts that can cover a distance of more than 1000?", "sql": "SELECT aid FROM Aircraft WHERE distance > 1000;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00349", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "How many aircrafts have distance between 1000 and 5000?", "sql": "SELECT COUNT(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00350", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the count of aircrafts that have a distance between 1000 and 5000?", "sql": "SELECT COUNT(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00351", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the name and distance for aircraft with id 12?", "sql": "SELECT name, distance FROM Aircraft WHERE aid = 12;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00352", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the name and distance for the aircraft that has an id of 12?", "sql": "SELECT name, distance FROM Aircraft WHERE aid = 12;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00353", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the minimum, average, and maximum distance of all aircrafts.", "sql": "SELECT MIN(distance), AVG(distance), MAX(distance) FROM Aircraft;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00354", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Return the minimum, average and maximum distances traveled across all aircrafts.", "sql": "SELECT MIN(distance), AVG(distance), MAX(distance) FROM Aircraft;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00355", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show the id and name of the aircraft with the maximum distance.", "sql": "SELECT aid, name FROM Aircraft ORDER BY distance DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00356", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the id and name of the aircraft that can cover the maximum distance?", "sql": "SELECT aid, name FROM Aircraft ORDER BY distance DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00357", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show the name of aircrafts with top three lowest distances.", "sql": "SELECT name FROM Aircraft ORDER BY distance LIMIT 3;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00358", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the aircrafts with top 3 shortest lengthes? List their names.", "sql": "SELECT name FROM Aircraft ORDER BY distance LIMIT 3;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00359", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show names for all aircrafts with distances more than the average.", "sql": "SELECT name FROM Aircraft WHERE distance > (SELECT AVG(distance) FROM Aircraft);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00360", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the names of all aircrafts that can cover more distances than average?", "sql": "SELECT name FROM Aircraft WHERE distance > (SELECT AVG(distance) FROM Aircraft);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00361", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "How many employees do we have?", "sql": "SELECT COUNT(*) FROM Employee;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00362", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the number of employees?", "sql": "SELECT COUNT(*) FROM Employee;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00363", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show name and salary for all employees sorted by salary.", "sql": "SELECT name, salary FROM Employee ORDER BY salary;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00364", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the name and salary of all employees in order of salary?", "sql": "SELECT name, salary FROM Employee ORDER BY salary;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00365", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show ids for all employees with at least 100000 salary.", "sql": "SELECT eid FROM Employee WHERE salary > 100000;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00366", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the id of every employee who has at least a salary of 100000?", "sql": "SELECT eid FROM Employee WHERE salary > 100000;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00367", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "How many employees have salary between 100000 and 200000?", "sql": "SELECT COUNT(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00368", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the number of employees that have a salary between 100000 and 200000?", "sql": "SELECT COUNT(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00369", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the name and salary for employee with id 242518965?", "sql": "SELECT name, salary FROM Employee WHERE eid = 242518965;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00370", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the name and salary of the employee with the id 242518965?", "sql": "SELECT name, salary FROM Employee WHERE eid = 242518965;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00371", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is average and maximum salary of all employees.", "sql": "SELECT AVG(salary), MAX(salary) FROM Employee;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00372", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the average and largest salary of all employees?", "sql": "SELECT AVG(salary), MAX(salary) FROM Employee;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00373", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show the id and name of the employee with maximum salary.", "sql": "SELECT eid, name FROM Employee ORDER BY salary DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00374", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the id and name of the employee with the highest salary?", "sql": "SELECT eid, name FROM Employee ORDER BY salary DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00375", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show the name of employees with three lowest salaries.", "sql": "SELECT name FROM Employee ORDER BY salary ASC LIMIT 3;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00376", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the name of the 3 employees who get paid the least?", "sql": "SELECT name FROM Employee ORDER BY salary ASC LIMIT 3;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00377", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show names for all employees with salary more than the average.", "sql": "SELECT name FROM Employee WHERE salary > (SELECT AVG(salary) FROM Employee);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00378", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the names of all employees who have a salary higher than average?", "sql": "SELECT name FROM Employee WHERE salary > (SELECT AVG(salary) FROM Employee);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00379", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show the id and salary of Mark Young.", "sql": "SELECT eid, salary FROM Employee WHERE name = 'Mark Young';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00380", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the id and salary of the employee named Mark Young?", "sql": "SELECT eid, salary FROM Employee WHERE name = 'Mark Young';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00381", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "How many flights do we have?", "sql": "SELECT COUNT(*) FROM Flight;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00382", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the number of flights?", "sql": "SELECT COUNT(*) FROM Flight;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00383", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show flight number, origin, destination of all flights in the alphabetical order of the departure cities.", "sql": "SELECT flno, origin, destination FROM Flight ORDER BY origin;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00384", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the flight number, origin, and destination for all flights in alphabetical order by departure cities?", "sql": "SELECT flno, origin, destination FROM Flight ORDER BY origin;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00385", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show all flight number from Los Angeles.", "sql": "SELECT flno FROM Flight WHERE origin = 'Los Angeles';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00386", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the numbers of all flights coming from Los Angeles?", "sql": "SELECT flno FROM Flight WHERE origin = 'Los Angeles';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00387", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show origins of all flights with destination Honolulu.", "sql": "SELECT origin FROM Flight WHERE destination = 'Honolulu';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00388", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the origins of all flights that are headed to Honolulu?", "sql": "SELECT origin FROM Flight WHERE destination = 'Honolulu';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00389", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show me the departure date and arrival date for all flights from Los Angeles to Honolulu.", "sql": "SELECT departure_date, arrival_date FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00390", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the departure and arrival dates of all flights from LA to Honolulu?", "sql": "SELECT departure_date, arrival_date FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00391", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show flight number for all flights with more than 2000 distance.", "sql": "SELECT flno FROM Flight WHERE distance > 2000;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00392", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the numbers of all flights that can cover a distance of more than 2000?", "sql": "SELECT flno FROM Flight WHERE distance > 2000;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00393", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the average price for flights from Los Angeles to Honolulu.", "sql": "SELECT AVG(price) FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00394", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the average price for flights from LA to Honolulu?", "sql": "SELECT AVG(price) FROM Flight WHERE origin = 'Los Angeles' AND destination = 'Honolulu';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00395", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show origin and destination for flights with price higher than 300.", "sql": "SELECT origin, destination FROM Flight WHERE price > 300;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00396", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the origin and destination for all flights whose price is higher than 300?", "sql": "SELECT origin, destination FROM Flight WHERE price > 300;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00397", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show the flight number and distance of the flight with maximum price.", "sql": "SELECT flno, distance FROM Flight ORDER BY price DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00398", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the flight number and its distance for the one with the maximum price?", "sql": "SELECT flno, distance FROM Flight ORDER BY price DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00401", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the average distance and average price for flights from Los Angeles.", "sql": "SELECT AVG(distance), AVG(price) FROM Flight WHERE origin = 'Los Angeles';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00402", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the average distance and price for all flights from LA?", "sql": "SELECT AVG(distance), AVG(price) FROM Flight WHERE origin = 'Los Angeles';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00403", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show all origins and the number of flights from each origin.", "sql": "SELECT origin, COUNT(*) FROM Flight GROUP BY origin;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00404", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "For each origin, how many flights came from there?", "sql": "SELECT origin, COUNT(*) FROM Flight GROUP BY origin;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00405", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show all destinations and the number of flights to each destination.", "sql": "SELECT destination, COUNT(*) FROM Flight GROUP BY destination;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00406", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the destinations and number of flights to each one?", "sql": "SELECT destination, COUNT(*) FROM Flight GROUP BY destination;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00407", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Which origin has most number of flights?", "sql": "SELECT origin FROM Flight GROUP BY origin ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00408", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What place has the most flights coming from there?", "sql": "SELECT origin FROM Flight GROUP BY origin ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00411", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the aircraft name for the flight with number 99", "sql": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00412", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the name of the aircraft that was on flight number 99?", "sql": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00413", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show all flight numbers with aircraft Airbus A340-300.", "sql": "SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = 'Airbus A340-300';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00414", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the flight numbers for the aircraft Airbus A340-300?", "sql": "SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = 'Airbus A340-300';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00415", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show aircraft names and number of flights for each aircraft.", "sql": "SELECT T2.name, COUNT(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid, T2.name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00416", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the name of each aircraft and how many flights does each one complete?", "sql": "SELECT T2.name, COUNT(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid, T2.name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00417", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show names for all aircraft with at least two flights.", "sql": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid, T2.name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00418", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the names for all aircrafts with at least 2 flights?", "sql": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid, T2.name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00419", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "How many employees have certificate.", "sql": "SELECT COUNT(DISTINCT eid) FROM Certificate;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00420", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the count of distinct employees with certificates?", "sql": "SELECT COUNT(DISTINCT eid) FROM Certificate;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00421", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show ids for all employees who don't have a certificate.", "sql": "SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00422", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the ids of all employees that don't have certificates?", "sql": "SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00423", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show names for all aircrafts of which John Williams has certificates.", "sql": "SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = 'John Williams';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00424", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the names of all aircrafts that John Williams have certificates to be able to fly?", "sql": "SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = 'John Williams';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00425", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show names for all employees who have certificate of Boeing 737-800.", "sql": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00426", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the names of all employees who have a certificate to fly Boeing 737-800?", "sql": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00427", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300.", "sql": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800' INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Airbus A340-300';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00428", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300?", "sql": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800' INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Airbus A340-300';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00429", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show names for all employees who do not have certificate of Boeing 737-800.", "sql": "SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00430", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the names of all employees who are not certified to fly Boeing 737-800s?", "sql": "SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = 'Boeing 737-800';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00431", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "Show the name of aircraft which fewest people have its certificate.", "sql": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid, T2.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00432", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What are the names of the aircraft that the least people are certified to fly?", "sql": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid, T2.name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00435", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "what is the salary and name of the employee who has the most number of aircraft certificates?", "sql": "SELECT T1.name, T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid, T1.name, T1.salary ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00436", "db_id": "flight_1", "schema_text": "CREATE TABLE aircraft (aid DOUBLE, name VARCHAR /* e.g. 'Airbus A319', 'Airbus A320' */, distance DOUBLE);\nCREATE TABLE certificate (eid DOUBLE, aid DOUBLE);\nCREATE TABLE employee (eid DOUBLE, name VARCHAR, salary DOUBLE);\nCREATE TABLE flight (flno DOUBLE, origin VARCHAR /* e.g. 'Los Angeles', 'Chicago' */, destination VARCHAR /* e.g. 'Honolulu', 'Boston' */, distance DOUBLE, departure_date VARCHAR /* e.g. '04/12/2005 05:30', '04/12/2005 06:30' */, arrival_date VARCHAR /* e.g. '04/12/2005 03:18', '04/12/2005 03:55' */, price DOUBLE, aid DOUBLE);", "question": "What is the salaray and name of the employee that is certified to fly the most planes?", "sql": "SELECT T1.name, T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid, T1.name, T1.salary ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00789", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "How many members have the black membership card?", "sql": "SELECT COUNT(*) FROM member WHERE Membership_card = 'Black';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00790", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "Find the number of members living in each address.", "sql": "SELECT COUNT(*), address FROM member GROUP BY address;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00791", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "Give me the names of members whose address is in Harford or Waterbury.", "sql": "SELECT name FROM member WHERE address = 'Harford' OR address = 'Waterbury';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00792", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "Find the ids and names of members who are under age 30 or with black membership card.", "sql": "SELECT name, member_id FROM member WHERE Membership_card = 'Black' OR age < 30;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00793", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "Find the purchase time, age and address of each member, and show the results in the order of purchase time.", "sql": "SELECT Time_of_purchase, age, address FROM member ORDER BY Time_of_purchase;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00794", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "Which membership card has more than 5 members?", "sql": "SELECT Membership_card FROM member GROUP BY Membership_card HAVING COUNT(*) > 5;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00795", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "Which address has both members younger than 30 and members older than 40?", "sql": "SELECT address FROM member WHERE age < 30 INTERSECT SELECT address FROM member WHERE age > 40;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00796", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "What is the membership card held by both members living in Hartford and ones living in Waterbury address?", "sql": "SELECT membership_card FROM member WHERE address = 'Hartford' INTERSECT SELECT membership_card FROM member WHERE address = 'Waterbury';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00797", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "How many members are not living in Hartford?", "sql": "SELECT COUNT(*) FROM member WHERE address <> 'Hartford';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00798", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "Which address do not have any member with the black membership card?", "sql": "SELECT address FROM member EXCEPT SELECT address FROM member WHERE Membership_card = 'Black';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00799", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "Show the shop addresses ordered by their opening year.", "sql": "SELECT address FROM shop ORDER BY open_year;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_00800", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "What are the average score and average staff number of all shops?", "sql": "SELECT AVG(num_of_staff), AVG(score) FROM shop;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00801", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "Find the id and address of the shops whose score is below the average score.", "sql": "SELECT shop_id, address FROM shop WHERE score < (SELECT AVG(score) FROM shop);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00802", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "Find the address and staff number of the shops that do not have any happy hour.", "sql": "SELECT address, num_of_staff FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM happy_hour);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_00803", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "What are the id and address of the shops which have a happy hour in May?", "sql": "SELECT t1.address, t1.shop_id FROM shop AS t1 JOIN happy_hour AS t2 ON t1.shop_id = t2.shop_id WHERE MONTH = 'May';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_00804", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "which shop has happy hour most frequently? List its id and number of happy hours.", "sql": "SELECT shop_id, COUNT(*) FROM happy_hour GROUP BY shop_id ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00805", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "Which month has the most happy hours?", "sql": "SELECT MONTH FROM happy_hour GROUP BY MONTH ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_00806", "db_id": "coffee_shop", "schema_text": "CREATE TABLE happy_hour (HH_ID BIGINT, Shop_ID BIGINT, Month VARCHAR /* e.g. 'April', 'May' */, Num_of_shaff_in_charge BIGINT);\nCREATE TABLE happy_hour_member (HH_ID BIGINT, Member_ID BIGINT, Total_amount DOUBLE);\nCREATE TABLE member (Member_ID BIGINT, Name VARCHAR /* e.g. 'Ashby, Lazale', 'Breton, Robert' */, Membership_card VARCHAR /* e.g. 'Black', 'White' */, Age BIGINT, Time_of_purchase BIGINT, Level_of_membership BIGINT, Address VARCHAR /* e.g. 'Waterbury', 'Hartford' */);\nCREATE TABLE shop (Shop_ID BIGINT, Address VARCHAR /* e.g. '1100 Main Street', '1111 Main Street' */, Num_of_staff BIGINT, Score DOUBLE, Open_Year BIGINT);", "question": "Which months have more than 2 happy hours?", "sql": "SELECT MONTH FROM happy_hour GROUP BY MONTH HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01052", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "How many countries are there in total?", "sql": "SELECT COUNT(*) FROM country;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01053", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Count the number of countries.", "sql": "SELECT COUNT(*) FROM country;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01054", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the country name and capital of all countries.", "sql": "SELECT Country_name, Capital FROM country;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01055", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the names and capitals of each country?", "sql": "SELECT Country_name, Capital FROM country;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01056", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show all official native languages that contain the word \"English\".", "sql": "SELECT Official_native_language FROM country WHERE Official_native_language ILIKE '%English%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01057", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the official native languages that contain the string \"English\".", "sql": "SELECT Official_native_language FROM country WHERE Official_native_language ILIKE '%English%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01058", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show all distinct positions of matches.", "sql": "SELECT DISTINCT POSITION FROM match_season;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01059", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the different positions for match season?", "sql": "SELECT DISTINCT POSITION FROM match_season;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01060", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the players from college UCLA.", "sql": "SELECT Player FROM match_season WHERE College = 'UCLA';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01061", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Who are the players from UCLA?", "sql": "SELECT Player FROM match_season WHERE College = 'UCLA';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01062", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the distinct position of players from college UCLA or Duke.", "sql": "SELECT DISTINCT POSITION FROM match_season WHERE College = 'UCLA' OR College = 'Duke';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01063", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the different positions of players from UCLA or Duke colleges?", "sql": "SELECT DISTINCT POSITION FROM match_season WHERE College = 'UCLA' OR College = 'Duke';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01064", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the draft pick numbers and draft classes of players whose positions are defenders.", "sql": "SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = 'Defender';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01065", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the draft pick numbers and draft classes for players who play the Defender position?", "sql": "SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = 'Defender';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01066", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "How many distinct teams are involved in match seasons?", "sql": "SELECT COUNT(DISTINCT Team) FROM match_season;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01067", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Count the number of different teams involved in match season.", "sql": "SELECT COUNT(DISTINCT Team) FROM match_season;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01068", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the players and the years played.", "sql": "SELECT Player, Years_Played FROM player;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01069", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Who are the different players and how many years has each played?", "sql": "SELECT Player, Years_Played FROM player;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01070", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show all team names.", "sql": "SELECT Name FROM Team;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01071", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the names of all teams?", "sql": "SELECT Name FROM Team;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01072", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the season, the player, and the name of the country that player belongs to.", "sql": "SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01073", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "For each player, what are their name, season, and country that they belong to?", "sql": "SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01074", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Which players are from Indonesia?", "sql": "SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = 'Indonesia';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01075", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Who are the players from Indonesia?", "sql": "SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = 'Indonesia';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01076", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the distinct positions of the players from a country whose capital is Dublin?", "sql": "SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = 'Dublin';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01077", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Give the different positions of players who play for the country with the capital Dublin.", "sql": "SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = 'Dublin';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01078", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the official languages of the countries of players from Maryland or Duke college?", "sql": "SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = 'Maryland' OR T2.College = 'Duke';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01079", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Return the official native languages of countries who have players from Maryland or Duke colleges.", "sql": "SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = 'Maryland' OR T2.College = 'Duke';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01080", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "How many distinct official languages are there among countries of players whose positions are defenders.", "sql": "SELECT COUNT(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01081", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Count the number of different official languages corresponding to countries that players who play Defender are from.", "sql": "SELECT COUNT(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01082", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the season, the player, and the name of the team that players belong to.", "sql": "SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01083", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Who are the different players, what season do they play in, and what is the name of the team they are on?", "sql": "SELECT T1.Season, T1.Player, T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01084", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the positions of the players from the team with name \"Ryley Goldner\".", "sql": "SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Ryley Goldner';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01085", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Return the positions of players on the team Ryley Goldner.", "sql": "SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Ryley Goldner';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01086", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "How many distinct colleges are associated with players from the team with name \"Columbus Crew\".", "sql": "SELECT COUNT(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01087", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Count the number of different colleges that players who play for Columbus Crew are from.", "sql": "SELECT COUNT(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01088", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the players and years played for players from team \"Columbus Crew\".", "sql": "SELECT T1.Player, T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01089", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the players who played for Columbus Crew, and how many years did each play for?", "sql": "SELECT T1.Player, T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Columbus Crew';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01090", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the position of players and the corresponding number of players.", "sql": "SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01091", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "How many players played each position?", "sql": "SELECT POSITION, COUNT(*) FROM match_season GROUP BY POSITION;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01092", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the country names and the corresponding number of players.", "sql": "SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name, Country_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01093", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "How many players are from each country?", "sql": "SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name, Country_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01094", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Return all players sorted by college in ascending alphabetical order.", "sql": "SELECT player FROM match_season ORDER BY College ASC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01095", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are all the players who played in match season, sorted by college in ascending alphabetical order?", "sql": "SELECT player FROM match_season ORDER BY College ASC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01096", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the most common position of players in match seasons.", "sql": "SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01097", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What is the position that is most common among players in match seasons?", "sql": "SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01098", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the top 3 most common colleges of players in match seasons.", "sql": "SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01099", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the three colleges from which the most players are from?", "sql": "SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01100", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the name of colleges that have at least two players.", "sql": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01101", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the names of all colleges that have two or more players?", "sql": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01102", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Show the name of colleges that have at least two players in descending alphabetical order.", "sql": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01103", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the names of colleges that have two or more players, listed in descending alphabetical order?", "sql": "SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01104", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the names of teams that do no have match season record?", "sql": "SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01105", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Return the names of teams that have no match season record.", "sql": "SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01106", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "What are the names of countries that have both players with position forward and players with position defender?", "sql": "SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Forward' INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01107", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Return the names of countries that have players that play the Forward position, as well as players who play the Defender position.", "sql": "SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Forward' INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = 'Defender';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01108", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Which college have both players with position midfielder and players with position defender?", "sql": "SELECT College FROM match_season WHERE POSITION = 'Midfielder' INTERSECT SELECT College FROM match_season WHERE POSITION = 'Defender';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01109", "db_id": "match_season", "schema_text": "CREATE TABLE country (Country_id BIGINT, Country_name VARCHAR /* e.g. 'Indonesia', 'Iran' */, Capital VARCHAR /* e.g. 'Baghdad', 'Douglas' */, Official_native_language VARCHAR /* e.g. 'Arabic ( Arabic script ) Kurdish', 'Bahasa Indonesia' */);\nCREATE TABLE match_season (Season DOUBLE, Player VARCHAR /* e.g. 'Andy Najar Category:Articles with hCards', 'Ben Olsen Category:Articles with hCards' */, Position VARCHAR /* e.g. 'Defender', 'Midfielder' */, Country BIGINT, Team BIGINT, Draft_Pick_Number BIGINT, Draft_Class VARCHAR /* e.g. '1996 MLS College Draft', '1996 MLS Inaugural Player Draft' */, College VARCHAR /* e.g. 'Maryland', 'UCLA' */);\nCREATE TABLE player (Player_ID BIGINT, Player VARCHAR /* e.g. 'An Jae-Sung', 'Bae Nam-Ju' */, Years_Played VARCHAR /* e.g. '1 (2011)', '2 (2010–2011)' */, Total_WL VARCHAR /* e.g. '0–0', '1–2' */, Singles_WL VARCHAR /* e.g. '0–0', '0–2' */, Doubles_WL VARCHAR /* e.g. '0–0', '1–1' */, Team BIGINT);\nCREATE TABLE team (Team_id BIGINT, Name VARCHAR /* e.g. 'Anais VonRueden', 'Berneice Hand' */);", "question": "Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position.", "sql": "SELECT College FROM match_season WHERE POSITION = 'Midfielder' INTERSECT SELECT College FROM match_season WHERE POSITION = 'Defender';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01322", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the buildings which have rooms with capacity more than 50.", "sql": "SELECT DISTINCT building FROM classroom WHERE capacity > 50;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01323", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the distinct buildings with capacities of greater than 50?", "sql": "SELECT DISTINCT building FROM classroom WHERE capacity > 50;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01324", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Count the number of rooms that are not in the Lamberton building.", "sql": "SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01325", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many classrooms are not in Lamberton?", "sql": "SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01326", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the name and building of the departments whose budget is more than the average budget?", "sql": "SELECT dept_name, building FROM department WHERE budget > (SELECT AVG(budget) FROM department);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01327", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Give the name and building of the departments with greater than average budget.", "sql": "SELECT dept_name, building FROM department WHERE budget > (SELECT AVG(budget) FROM department);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01328", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the room number of the rooms which can sit 50 to 100 students and their buildings.", "sql": "SELECT building, room_number FROM classroom WHERE capacity BETWEEN 50 AND 100;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01329", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students?", "sql": "SELECT building, room_number FROM classroom WHERE capacity BETWEEN 50 AND 100;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01330", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name and building of the department with the highest budget.", "sql": "SELECT dept_name, building FROM department ORDER BY budget DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01331", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the department name and corresponding building for the department with the greatest budget?", "sql": "SELECT dept_name, building FROM department ORDER BY budget DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01332", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the name of the student who has the highest total credits in the History department.", "sql": "SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01333", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Give the name of the student in the History department with the most credits.", "sql": "SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01334", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many rooms does the Lamberton building have?", "sql": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01335", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Count the number of classrooms in Lamberton.", "sql": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01336", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many students have advisors?", "sql": "SELECT COUNT(DISTINCT s_id) FROM advisor;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01337", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Count the number of students who have advisors.", "sql": "SELECT COUNT(DISTINCT s_id) FROM advisor;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01338", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many departments offer courses?", "sql": "SELECT COUNT(DISTINCT dept_name) FROM course;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01339", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Count the number of departments which offer courses.", "sql": "SELECT COUNT(DISTINCT dept_name) FROM course;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01340", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many different courses offered by Physics department?", "sql": "SELECT COUNT(DISTINCT course_id) FROM course WHERE dept_name = 'Physics';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01341", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Count the number of courses in the Physics department.", "sql": "SELECT COUNT(DISTINCT course_id) FROM course WHERE dept_name = 'Physics';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01342", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the title of courses that have two prerequisites?", "sql": "SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id, T1.title HAVING COUNT(*) = 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01343", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the titles for courses with two prerequisites?", "sql": "SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id, T1.title HAVING COUNT(*) = 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01344", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the title, credit, and department name of courses that have more than one prerequisites?", "sql": "SELECT T1.title, T1.credits, T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id, T1.title, T1.credits, T1.dept_name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01345", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the title, credit value, and department name for courses with more than one prerequisite?", "sql": "SELECT T1.title, T1.credits, T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id, T1.title, T1.credits, T1.dept_name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01346", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many courses that do not have prerequisite?", "sql": "SELECT COUNT(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01347", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Count the number of courses without prerequisites.", "sql": "SELECT COUNT(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01348", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name of the courses that do not have any prerequisite?", "sql": "SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01349", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the titles of courses without prerequisites?", "sql": "SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01350", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many different instructors have taught some course?", "sql": "SELECT COUNT(DISTINCT id) FROM teaches;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01351", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Count the number of distinct instructors who have taught a course.", "sql": "SELECT COUNT(DISTINCT id) FROM teaches;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01352", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the total budgets of the Marketing or Finance department.", "sql": "SELECT SUM(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01353", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the sum of budgets of the Marketing and Finance departments?", "sql": "SELECT SUM(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01354", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the department name of the instructor whose name contains 'Soisalon'.", "sql": "SELECT dept_name FROM instructor WHERE name ILIKE '%Soisalon%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01355", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the name of the department with an instructure who has a name like 'Soisalon'?", "sql": "SELECT dept_name FROM instructor WHERE name ILIKE '%Soisalon%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01356", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many rooms whose capacity is less than 50 does the Lamberton building have?", "sql": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01357", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Count the number of rooms in Lamberton with capacity lower than 50.", "sql": "SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01358", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name and budget of departments whose budgets are more than the average budget.", "sql": "SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01359", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names and budgets of departments with budgets greater than the average?", "sql": "SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01360", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "what is the name of the instructor who is in Statistics department and earns the lowest salary?", "sql": "SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01361", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Give the name of the lowest earning instructor in the Statistics department.", "sql": "SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01362", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the title of course that is provided by both Statistics and Psychology departments.", "sql": "SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01363", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the title of a course that is listed in both the Statistics and Psychology departments?", "sql": "SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01364", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the title of course that is provided by Statistics but not Psychology departments.", "sql": "SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01365", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the titles of courses that are in the Statistics department but not the Psychology department?", "sql": "SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01366", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010.", "sql": "SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01367", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010?", "sql": "SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01368", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name of students who took any class in the years of 2009 and 2010.", "sql": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01369", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of the students who took classes in 2009 or 2010?", "sql": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01370", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the names of the top 3 departments that provide the largest amount of courses?", "sql": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01371", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of the 3 departments with the most courses?", "sql": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01372", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name of the department that offers the highest total credits?", "sql": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY SUM(credits) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01373", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the name of the department with the most credits?", "sql": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY SUM(credits) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01374", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "List the names of all courses ordered by their titles and credits.", "sql": "SELECT title FROM course ORDER BY title, credits;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01375", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Given the titles of all courses, in order of titles and credits.", "sql": "SELECT title FROM course ORDER BY title, credits;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01376", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Which department has the lowest budget?", "sql": "SELECT dept_name FROM department ORDER BY budget LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01377", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Give the name of the department with the lowest budget.", "sql": "SELECT dept_name FROM department ORDER BY budget LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01378", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "List the names and buildings of all departments sorted by the budget from large to small.", "sql": "SELECT dept_name, building FROM department ORDER BY budget DESC;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01379", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names and buildings of the deparments, sorted by budget descending?", "sql": "SELECT dept_name, building FROM department ORDER BY budget DESC;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01380", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Who is the instructor with the highest salary?", "sql": "SELECT name FROM instructor ORDER BY salary DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01381", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Give the name of the highest paid instructor.", "sql": "SELECT name FROM instructor ORDER BY salary DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01382", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "List the information of all instructors ordered by their salary in ascending order.", "sql": "SELECT * FROM instructor ORDER BY salary;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01383", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Give all information regarding instructors, in order of salary from least to greatest.", "sql": "SELECT * FROM instructor ORDER BY salary;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01388", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name of instructors who are advising more than one student.", "sql": "SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id, T1.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01389", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of instructors who advise more than one student?", "sql": "SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id, T1.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01390", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name of the students who have more than one advisor?", "sql": "SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id = T2.s_id GROUP BY T2.s_id, T1.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01391", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of students who have more than one advisor?", "sql": "SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id = T2.s_id GROUP BY T2.s_id, T1.name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01392", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the number of rooms with more than 50 capacity for each building.", "sql": "SELECT COUNT(*), building FROM classroom WHERE capacity > 50 GROUP BY building;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01393", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many rooms in each building have a capacity of over 50?", "sql": "SELECT COUNT(*), building FROM classroom WHERE capacity > 50 GROUP BY building;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01394", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the maximum and average capacity among rooms in each building.", "sql": "SELECT MAX(capacity), AVG(capacity), building FROM classroom GROUP BY building;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01395", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the greatest and average capacity for rooms in each building?", "sql": "SELECT MAX(capacity), AVG(capacity), building FROM classroom GROUP BY building;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01396", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the title of the course that is offered by more than one department.", "sql": "SELECT title FROM course GROUP BY title HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01397", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the titles of courses that are offered in more than one department?", "sql": "SELECT title FROM course GROUP BY title HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01398", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the total credits of courses provided by different department.", "sql": "SELECT SUM(credits), dept_name FROM course GROUP BY dept_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01399", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many total credits are offered by each department?", "sql": "SELECT SUM(credits), dept_name FROM course GROUP BY dept_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01400", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the minimum salary for the departments whose average salary is above the average payment of all instructors.", "sql": "SELECT MIN(salary), dept_name FROM instructor GROUP BY dept_name HAVING AVG(salary) > (SELECT AVG(salary) FROM instructor);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01401", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the lowest salary in departments with average salary greater than the overall average.", "sql": "SELECT MIN(salary), dept_name FROM instructor GROUP BY dept_name HAVING AVG(salary) > (SELECT AVG(salary) FROM instructor);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01402", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the number of courses provided in each semester and year.", "sql": "SELECT COUNT(*), semester, YEAR FROM SECTION GROUP BY semester, YEAR;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01403", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many courses are provided in each semester and year?", "sql": "SELECT COUNT(*), semester, YEAR FROM SECTION GROUP BY semester, YEAR;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01404", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the year which offers the largest number of courses.", "sql": "SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01405", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Which year had the greatest number of courses?", "sql": "SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01406", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the year and semester when offers the largest number of courses.", "sql": "SELECT semester, YEAR FROM SECTION GROUP BY semester, YEAR ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01407", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the year and semester with the most courses?", "sql": "SELECT semester, YEAR FROM SECTION GROUP BY semester, YEAR ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01408", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name of department has the highest amount of students?", "sql": "SELECT dept_name FROM student GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01409", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the name of the deparment with the highest enrollment?", "sql": "SELECT dept_name FROM student GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01410", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the total number of students in each department.", "sql": "SELECT COUNT(*), dept_name FROM student GROUP BY dept_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01411", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many students are in each department?", "sql": "SELECT COUNT(*), dept_name FROM student GROUP BY dept_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01412", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the semester and year which has the least number of student taking any class.", "sql": "SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01413", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Which semeseter and year had the fewest students?", "sql": "SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01414", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the id of the instructor who advises of all students from History department?", "sql": "SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01415", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Give id of the instructor who advises students in the History department.", "sql": "SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01416", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name and salary of the instructors who are advisors of any student from History department?", "sql": "SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01417", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names and salaries of instructors who advises students in the History department?", "sql": "SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01418", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the id of the courses that do not have any prerequisite?", "sql": "SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01419", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the ids of courses without prerequisites?", "sql": "SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01421", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of courses without prerequisites?", "sql": "SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01422", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the title of the prerequisite class of International Finance course?", "sql": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01423", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Give the title of the prerequisite to the course International Finance.", "sql": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01424", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the title of course whose prerequisite is course Differential Geometry.", "sql": "SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01425", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the title of the course with Differential Geometry as a prerequisite?", "sql": "SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01426", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the names of students who have taken any course in the fall semester of year 2003.", "sql": "SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01427", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of students who took a course in the Fall of 2003?", "sql": "SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01428", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010?", "sql": "SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE building = 'Chandler' AND semester = 'Fall' AND YEAR = 2010;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01429", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Give the title of the course offered in Chandler during the Fall of 2010.", "sql": "SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE building = 'Chandler' AND semester = 'Fall' AND YEAR = 2010;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01430", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name of the instructors who taught C Programming course before.", "sql": "SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01431", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of instructors who have taught C Programming courses?", "sql": "SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01432", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name and salary of instructors who are advisors of the students from the Math department.", "sql": "SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01433", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names and salaries of instructors who advise students in the Math department?", "sql": "SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01436", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the course title of the prerequisite of course Mobile Computing?", "sql": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01437", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the title of the course that is a prerequisite for Mobile Computing?", "sql": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01438", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name of instructor who is the advisor of the student who has the highest number of total credits.", "sql": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01439", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the name of the instructor who advises the student with the greatest number of total credits?", "sql": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01440", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name of instructors who didn't teach any courses?", "sql": "SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01441", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of instructors who didn't teach?", "sql": "SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01442", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the id of instructors who didn't teach any courses?", "sql": "SELECT id FROM instructor EXCEPT SELECT id FROM teaches;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01443", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the ids of instructors who didnt' teach?", "sql": "SELECT id FROM instructor EXCEPT SELECT id FROM teaches;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01444", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the names of instructors who didn't each any courses in any Spring semester.", "sql": "SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester = 'Spring');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01445", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of instructors who didn't teach courses in the Spring?", "sql": "SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester = 'Spring');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01446", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name of the department which has the highest average salary of professors.", "sql": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY AVG(salary) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01447", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Which department has the highest average instructor salary?", "sql": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY AVG(salary) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01450", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)?", "sql": "SELECT T3.title, T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT MAX(capacity) FROM classroom);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01451", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Give the title and credits for the course that is taught in the classroom with the greatest capacity.", "sql": "SELECT T3.title, T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT MAX(capacity) FROM classroom);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01452", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name of students who didn't take any course from Biology department.", "sql": "SELECT name FROM student WHERE id NOT IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01453", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of students who haven't taken any Biology courses?", "sql": "SELECT name FROM student WHERE id NOT IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01454", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the total number of students and total number of instructors for each department.", "sql": "SELECT COUNT(DISTINCT T2.id), COUNT(DISTINCT T3.id), T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01455", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many students and instructors are in each department?", "sql": "SELECT COUNT(DISTINCT T2.id), COUNT(DISTINCT T3.id), T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01456", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name of students who have taken the prerequisite course of the course with title International Finance.", "sql": "SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance');", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01457", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of students who have taken the prerequisite for the course International Finance?", "sql": "SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance');", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01458", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department.", "sql": "SELECT name, salary FROM instructor WHERE salary < (SELECT AVG(salary) FROM instructor WHERE dept_name = 'Physics');", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01459", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department?", "sql": "SELECT name, salary FROM instructor WHERE salary < (SELECT AVG(salary) FROM instructor WHERE dept_name = 'Physics');", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01460", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the name of students who took some course offered by Statistics department.", "sql": "SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01461", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of students who have taken Statistics courses?", "sql": "SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01462", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles.", "sql": "SELECT T2.building, T2.room_number, T2.semester, T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01463", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the building, room number, semester and year of courses in the Psychology department, sorted using course title?", "sql": "SELECT T2.building, T2.room_number, T2.semester, T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01464", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the names of all instructors in computer science department", "sql": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01465", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of all instructors in the Comp. Sci. department?", "sql": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01466", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the names of all instructors in Comp. Sci. department with salary > 80000.", "sql": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01467", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of the instructors in the Comp. Sci. department who earn more than 80000?", "sql": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01468", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the names of all instructors who have taught some course and the course_id.", "sql": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01469", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of all instructors who have taught a course, as well as the corresponding course id?", "sql": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01470", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the names of all instructors in the Art department who have taught some course and the course_id.", "sql": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01471", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of Art instructors who have taught a course, and the corresponding course id?", "sql": "SELECT name, course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01472", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the names of all instructors whose name includes the substring “dar”.", "sql": "SELECT name FROM instructor WHERE name ILIKE '%dar%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01473", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of all instructors with names that include \"dar\"?", "sql": "SELECT name FROM instructor WHERE name ILIKE '%dar%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01474", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "List in alphabetic order the names of all distinct instructors.", "sql": "SELECT DISTINCT name FROM instructor ORDER BY name;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01475", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "List the distinct names of the instructors, ordered by name.", "sql": "SELECT DISTINCT name FROM instructor ORDER BY name;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01476", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find courses that ran in Fall 2009 or in Spring 2010.", "sql": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01477", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the ids for courses in the Fall of 2009 or the Spring of 2010?", "sql": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01478", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find courses that ran in Fall 2009 and in Spring 2010.", "sql": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01479", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010?", "sql": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01480", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find courses that ran in Fall 2009 but not in Spring 2010.", "sql": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01481", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the ids of courses offered in Fall of 2009 but not in Spring of 2010?", "sql": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_01482", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the salaries of all distinct instructors that are less than the largest salary.", "sql": "SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT MAX(salary) FROM instructor);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01483", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the distinct salaries of all instructors who earned less than the maximum salary?", "sql": "SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT MAX(salary) FROM instructor);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01484", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the total number of instructors who teach a course in the Spring 2010 semester.", "sql": "SELECT COUNT(DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01485", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "How many instructors teach a course in the Spring of 2010?", "sql": "SELECT COUNT(DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01486", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the names and average salaries of all departments whose average salary is greater than 42000.", "sql": "SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name HAVING AVG(salary) > 42000;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01487", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names and average salaries for departments with average salary higher than 42000?", "sql": "SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name HAVING AVG(salary) > 42000;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01488", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department.", "sql": "SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01489", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of instructors who earn more than at least one instructor from the Biology department?", "sql": "SELECT name FROM instructor WHERE salary > (SELECT MIN(salary) FROM instructor WHERE dept_name = 'Biology');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01490", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department.", "sql": "SELECT name FROM instructor WHERE salary > (SELECT MAX(salary) FROM instructor WHERE dept_name = 'Biology');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01491", "db_id": "college_2", "schema_text": "CREATE TABLE advisor (s_ID BIGINT, i_ID BIGINT);\nCREATE TABLE classroom (building VARCHAR /* e.g. 'Saucon', 'Alumni' */, room_number BIGINT, capacity DOUBLE);\nCREATE TABLE course (course_id BIGINT, title VARCHAR, dept_name VARCHAR /* e.g. 'Cybernetics', 'Finance' */, credits DOUBLE);\nCREATE TABLE department (dept_name VARCHAR /* e.g. 'Accounting', 'Astronomy' */, building VARCHAR /* e.g. 'Taylor', 'Candlestick' */, budget DOUBLE);\nCREATE TABLE instructor (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Statistics', 'Athletics' */, salary DOUBLE);\nCREATE TABLE prereq (course_id BIGINT, prereq_id BIGINT);\nCREATE TABLE section (course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, building VARCHAR /* e.g. 'Saucon', 'Taylor' */, room_number BIGINT, time_slot_id VARCHAR /* e.g. 'D', 'J' */);\nCREATE TABLE student (ID BIGINT, name VARCHAR, dept_name VARCHAR /* e.g. 'Civil Eng.', 'Languages' */, tot_cred DOUBLE);\nCREATE TABLE takes (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE, grade VARCHAR /* e.g. 'B-', 'C+' */);\nCREATE TABLE teaches (ID BIGINT, course_id BIGINT, sec_id BIGINT, semester VARCHAR /* e.g. 'Fall', 'Spring' */, year DOUBLE);\nCREATE TABLE time_slot (time_slot_id VARCHAR /* e.g. 'A', 'B' */, day VARCHAR /* e.g. 'W', 'F' */, start_hr DOUBLE, start_min DOUBLE, end_hr DOUBLE, end_min DOUBLE);", "question": "What are the names of all instructors with a higher salary than any of the instructors in the Biology department?", "sql": "SELECT name FROM instructor WHERE salary > (SELECT MAX(salary) FROM instructor WHERE dept_name = 'Biology');", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01492", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "How many debates are there?", "sql": "SELECT COUNT(*) FROM debate;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01493", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "List the venues of debates in ascending order of the number of audience.", "sql": "SELECT Venue FROM debate ORDER BY Num_of_Audience ASC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01494", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "What are the date and venue of each debate?", "sql": "SELECT Date, Venue FROM debate;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01495", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "List the dates of debates with number of audience bigger than 150", "sql": "SELECT Date FROM debate WHERE Num_of_Audience > 150;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01496", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "Show the names of people aged either 35 or 36.", "sql": "SELECT Name FROM people WHERE Age = 35 OR Age = 36;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01497", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "What is the party of the youngest people?", "sql": "SELECT Party FROM people ORDER BY Age ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01498", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "Show different parties of people along with the number of people in each party.", "sql": "SELECT Party, COUNT(*) FROM people GROUP BY Party;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01499", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "Show the party that has the most people.", "sql": "SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01500", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "Show the distinct venues of debates", "sql": "SELECT DISTINCT Venue FROM debate;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01501", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "Show the names of people, and dates and venues of debates they are on the affirmative side.", "sql": "SELECT T3.Name, T2.Date, T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01503", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "Show the names of people that are on affirmative side of debates with number of audience bigger than 200.", "sql": "SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID WHERE T2.Num_of_Audience > 200;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01504", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "Show the names of people and the number of times they have been on the affirmative side of debates.", "sql": "SELECT T2.Name, COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01505", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "Show the names of people who have been on the negative side of debates at least twice.", "sql": "SELECT T2.Name FROM debate_people AS T1 JOIN people AS T2 ON T1.Negative = T2.People_ID GROUP BY T2.Name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01506", "db_id": "debate", "schema_text": "CREATE TABLE debate (Debate_ID BIGINT, Date VARCHAR /* e.g. 'August 3, 2015', 'December 17, 2014' */, Venue VARCHAR /* e.g. 'Manama , Bahrain', 'Abu Dhabi , UAE' */, Num_of_Audience BIGINT);\nCREATE TABLE debate_people (Debate_ID BIGINT, Affirmative BIGINT, Negative BIGINT, If_Affirmative_Win VARCHAR /* e.g. 'F', 'T' */);\nCREATE TABLE people (People_ID BIGINT, District VARCHAR /* e.g. 'New York 1', 'New York 10' */, Name VARCHAR /* e.g. 'Charles Van Wyck', 'Daniel Sickles' */, Party VARCHAR /* e.g. 'Republican', 'Democratic' */, Age BIGINT);", "question": "List the names of people that have not been on the affirmative side of debates.", "sql": "SELECT Name FROM people WHERE People_id NOT IN (SELECT Affirmative FROM debate_people);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01844", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "How many wrestlers are there?", "sql": "SELECT COUNT(*) FROM wrestler;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01845", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Count the number of wrestlers.", "sql": "SELECT COUNT(*) FROM wrestler;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01848", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "What is the name of the wrestler with the fewest days held?", "sql": "SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01849", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Return the name of the wrestler who had the lowest number of days held.", "sql": "SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01850", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "What are the distinct reigns of wrestlers whose location is not \"Tokyo,Japan\" ?", "sql": "SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> 'Tokyo , Japan';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01851", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Give the different reigns of wrestlers who are not located in Tokyo, Japan.", "sql": "SELECT DISTINCT Reign FROM wrestler WHERE LOCATION <> 'Tokyo , Japan';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01852", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "What are the names and location of the wrestlers?", "sql": "SELECT Name, LOCATION FROM wrestler;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01853", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Give the names and locations of all wrestlers.", "sql": "SELECT Name, LOCATION FROM wrestler;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01854", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "What are the elimination moves of wrestlers whose team is \"Team Orton\"?", "sql": "SELECT Elimination_Move FROM Elimination WHERE Team = 'Team Orton';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01855", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Return the elimination movies of wrestlers on Team Orton.", "sql": "SELECT Elimination_Move FROM Elimination WHERE Team = 'Team Orton';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01856", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "What are the names of wrestlers and the elimination moves?", "sql": "SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01857", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Give the names of wrestlers and their elimination moves.", "sql": "SELECT T2.Name, T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01860", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "List the time of elimination of the wrestlers with largest days held.", "sql": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01861", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "What is the time of elimination for the wrestler with the most days held?", "sql": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01864", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Show different teams in eliminations and the number of eliminations from each team.", "sql": "SELECT Team, COUNT(*) FROM elimination GROUP BY Team;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01865", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "How many eliminations did each team have?", "sql": "SELECT Team, COUNT(*) FROM elimination GROUP BY Team;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01866", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Show teams that have suffered more than three eliminations.", "sql": "SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01867", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Which teams had more than 3 eliminations?", "sql": "SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01868", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Show the reign and days held of wrestlers.", "sql": "SELECT Reign, Days_held FROM wrestler;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01869", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "What are the reigns and days held of all wrestlers?", "sql": "SELECT Reign, Days_held FROM wrestler;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01872", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Please show the most common reigns of wrestlers.", "sql": "SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01873", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Which reign is the most common among wrestlers?", "sql": "SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01874", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "List the locations that are shared by more than two wrestlers.", "sql": "SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01875", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Which locations are shared by more than two wrestlers?", "sql": "SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01876", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "List the names of wrestlers that have not been eliminated.", "sql": "SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01877", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "What are the names of wrestlers who have never been eliminated?", "sql": "SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01878", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Show the teams that have both wrestlers eliminated by \"Orton\" and wrestlers eliminated by \"Benjamin\".", "sql": "SELECT Team FROM Elimination WHERE Eliminated_By = 'Orton' INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = 'Benjamin';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01879", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin?", "sql": "SELECT Team FROM Elimination WHERE Eliminated_By = 'Orton' INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = 'Benjamin';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01880", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "What is the number of distinct teams that suffer elimination?", "sql": "SELECT COUNT(DISTINCT team) FROM elimination;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01881", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "How many different teams have had eliminated wrestlers?", "sql": "SELECT COUNT(DISTINCT team) FROM elimination;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01882", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "Show the times of elimination by \"Punk\" or \"Orton\".", "sql": "SELECT TIME FROM elimination WHERE Eliminated_By = 'Punk' OR Eliminated_By = 'Orton';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01883", "db_id": "wrestler", "schema_text": "CREATE TABLE Elimination (Elimination_ID BIGINT, Wrestler_ID BIGINT, Team VARCHAR /* e.g. 'Team Batista', 'Team Orton' */, Eliminated_By VARCHAR /* e.g. 'Batista', 'Benjamin' */, Elimination_Move VARCHAR /* e.g. 'Go To Sleep', 'Paydirt' */, Time VARCHAR /* e.g. '00:11', '07:38' */);\nCREATE TABLE wrestler (Wrestler_ID BIGINT, Name VARCHAR /* e.g. 'El Samurai', 'El Samurai §' */, Reign BIGINT, Days_held BIGINT, Location VARCHAR /* e.g. 'Tokyo , Japan', 'Tijuana , Mexico' */, Event VARCHAR /* e.g. 'Live event', 'Wrestling World 1997' */);", "question": "What are the times of elimination for any instances in which the elimination was done by Punk or Orton?", "sql": "SELECT TIME FROM elimination WHERE Eliminated_By = 'Punk' OR Eliminated_By = 'Orton';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01978", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "How many phones are there?", "sql": "SELECT COUNT(*) FROM phone;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01979", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "List the names of phones in ascending order of price.", "sql": "SELECT Name FROM phone ORDER BY Price ASC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01980", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "What are the memories and carriers of phones?", "sql": "SELECT Memory_in_G, Carrier FROM phone;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01981", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "List the distinct carriers of phones with memories bigger than 32.", "sql": "SELECT DISTINCT Carrier FROM phone WHERE Memory_in_G > 32;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_01982", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "Show the names of phones with carrier either \"Sprint\" or \"TMobile\".", "sql": "SELECT Name FROM phone WHERE Carrier = 'Sprint' OR Carrier = 'TMobile';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01983", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "What is the carrier of the most expensive phone?", "sql": "SELECT Carrier FROM phone ORDER BY Price DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01984", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "Show different carriers of phones together with the number of phones with each carrier.", "sql": "SELECT Carrier, COUNT(*) FROM phone GROUP BY Carrier;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01985", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "Show the most frequently used carrier of the phones.", "sql": "SELECT Carrier FROM phone GROUP BY Carrier ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01986", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "Show the carriers that have both phones with memory smaller than 32 and phones with memory bigger than 64.", "sql": "SELECT Carrier FROM phone WHERE Memory_in_G < 32 INTERSECT SELECT Carrier FROM phone WHERE Memory_in_G > 64;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01987", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "Show the names of phones and the districts of markets they are on.", "sql": "SELECT T3.Name, T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01989", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "Show the names of phones that are on market with number of shops greater than 50.", "sql": "SELECT T3.Name FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID WHERE T2.Num_of_shops > 50;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01990", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "For each phone, show its names and total number of stocks.", "sql": "SELECT T2.Name, SUM(T1.Num_of_stock) FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_01991", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "Show the names of phones that have total number of stocks bigger than 2000, in descending order of the total number of stocks.", "sql": "SELECT T2.Name FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name HAVING SUM(T1.Num_of_stock) >= 2000 ORDER BY SUM(T1.Num_of_stock) DESC;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_01992", "db_id": "phone_market", "schema_text": "CREATE TABLE market (Market_ID BIGINT, District VARCHAR /* e.g. 'Alberta', 'British Columbia' */, Num_of_employees BIGINT, Num_of_shops DOUBLE, Ranking BIGINT);\nCREATE TABLE phone (Name VARCHAR /* e.g. 'IPhone 5s', 'IPhone 6' */, Phone_ID BIGINT, Memory_in_G BIGINT, Carrier VARCHAR /* e.g. 'TMobile', 'Sprint' */, Price DOUBLE);\nCREATE TABLE phone_market (Market_ID BIGINT, Phone_ID BIGINT, Num_of_stock BIGINT);", "question": "List the names of phones that are not on any market.", "sql": "SELECT Name FROM phone WHERE Phone_id NOT IN (SELECT Phone_ID FROM phone_market);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_02802", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "How many journalists are there?", "sql": "SELECT COUNT(*) FROM journalist;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_02803", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "List the names of journalists in ascending order of years working.", "sql": "SELECT Name FROM journalist ORDER BY Years_working ASC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_02804", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "What are the nationalities and ages of journalists?", "sql": "SELECT Nationality, Age FROM journalist;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_02805", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "Show the names of journalists from \"England\" or \"Wales\".", "sql": "SELECT Name FROM journalist WHERE Nationality = 'England' OR Nationality = 'Wales';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_02806", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "What is the average number of years spent working as a journalist?", "sql": "SELECT AVG(Years_working) FROM journalist;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_02807", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "What is the nationality of the journalist with the largest number of years working?", "sql": "SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_02808", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "Show the different nationalities and the number of journalists of each nationality.", "sql": "SELECT Nationality, COUNT(*) FROM journalist GROUP BY Nationality;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_02809", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "Show the most common nationality for journalists.", "sql": "SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_02810", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.", "sql": "SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_02811", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "Show the dates, places, and names of events in descending order of the attendance.", "sql": "SELECT Date, Name, venue FROM event ORDER BY Event_Attendance DESC;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_02812", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "Show the names of journalists and the dates of the events they reported.", "sql": "SELECT T3.Name, T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_02814", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "Show the names of journalists and the number of events they reported.", "sql": "SELECT T3.Name, COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_02815", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "Show the names of journalists that have reported more than one event.", "sql": "SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_02816", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "List the names of journalists who have not reported any event.", "sql": "SELECT Name FROM journalist WHERE journalist_ID NOT IN (SELECT journalist_ID FROM news_report);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_02817", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "what are the average and maximum attendances of all events?", "sql": "SELECT AVG(Event_Attendance), MAX(Event_Attendance) FROM event;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_02818", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "Find the average age and experience working length of journalists working on different role type.", "sql": "SELECT AVG(t1.age), AVG(Years_working), t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_02819", "db_id": "news_report", "schema_text": "CREATE TABLE event (Event_ID BIGINT, Date VARCHAR /* e.g. '11 October 2007', '13 October 2008' */, Venue VARCHAR /* e.g. 'Hispano', 'Marathon' */, Name VARCHAR /* e.g. 'Global Awarding', 'Government Hearing' */, Event_Attendance BIGINT);\nCREATE TABLE journalist (journalist_ID BIGINT, Name VARCHAR /* e.g. 'Frank Mitcheson', 'Fred Chandler' */, Nationality VARCHAR /* e.g. 'England', 'Northern Ireland' */, Age BIGINT, Years_working BIGINT);\nCREATE TABLE news_report (journalist_ID BIGINT, Event_ID BIGINT, Work_Type VARCHAR /* e.g. 'Screening', 'Host' */);", "question": "List the event venues and names that have the top 2 most number of people attended.", "sql": "SELECT venue, name FROM event ORDER BY Event_Attendance DESC LIMIT 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03768", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "How many courses are there in total?", "sql": "SELECT COUNT(*) FROM COURSES;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03769", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the total number of courses offered.", "sql": "SELECT COUNT(*) FROM COURSES;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03770", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the descriptions of the courses with name \"database\"?", "sql": "SELECT course_description FROM COURSES WHERE course_name = 'database';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03771", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Return the description for the courses named \"database\".", "sql": "SELECT course_description FROM COURSES WHERE course_name = 'database';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03772", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the addresses of the course authors or tutors with personal name \"Cathrine\"", "sql": "SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = 'Cathrine';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03773", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Return the addresses of the course authors or tutors whose personal name is \"Cathrine\".", "sql": "SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name = 'Cathrine';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03774", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "List the addresses of all the course authors or tutors.", "sql": "SELECT address_line_1 FROM Course_Authors_and_Tutors;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03775", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What is the address of each course author or tutor?", "sql": "SELECT address_line_1 FROM Course_Authors_and_Tutors;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03776", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "List all the login names and family names of course author and tutors.", "sql": "SELECT login_name, family_name FROM Course_Authors_and_Tutors;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03777", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the login names and family names of course author and tutors?", "sql": "SELECT login_name, family_name FROM Course_Authors_and_Tutors;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03778", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "List all the dates of enrollment and completion of students.", "sql": "SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03779", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are all the dates of enrollment and completion in record?", "sql": "SELECT date_of_enrolment, date_of_completion FROM Student_Course_Enrolment;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03780", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "How many distinct students are enrolled in courses?", "sql": "SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03781", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the number of distinct students enrolled in courses.", "sql": "SELECT COUNT(DISTINCT student_id) FROM Student_Course_Enrolment;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03782", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "How many distinct courses are enrolled in by students?", "sql": "SELECT COUNT(course_id) FROM Student_Course_Enrolment;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03783", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the number of distinct courses that have enrolled students.", "sql": "SELECT COUNT(course_id) FROM Student_Course_Enrolment;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03784", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the dates of the tests taken with result \"Pass\".", "sql": "SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = 'Pass';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03785", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Which tests have \"Pass\" results? Return the dates when the tests were taken.", "sql": "SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = 'Pass';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03786", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "How many tests have result \"Fail\"?", "sql": "SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = 'Fail';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03787", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Count the number of tests with \"Fail\" result.", "sql": "SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = 'Fail';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03788", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the login names of the students with family name \"Ward\"?", "sql": "SELECT login_name FROM Students WHERE family_name = 'Ward';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03789", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Return the login names of the students whose family name is \"Ward\".", "sql": "SELECT login_name FROM Students WHERE family_name = 'Ward';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03790", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the dates of the latest logon of the students with family name \"Jaskolski\" or \"Langosh\"?", "sql": "SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03791", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the latest logon date of the students whose family name is \"Jaskolski\" or \"Langosh\".", "sql": "SELECT date_of_latest_logon FROM Students WHERE family_name = 'Jaskolski' OR family_name = 'Langosh';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03792", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "How many students have personal names that contain the word \"son\"?", "sql": "SELECT COUNT(*) FROM Students WHERE personal_name ILIKE '%son%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03793", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the number of students who have the word \"son\" in their personal names.", "sql": "SELECT COUNT(*) FROM Students WHERE personal_name ILIKE '%son%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03794", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "List all the subject names.", "sql": "SELECT subject_name FROM SUBJECTS;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03795", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the names of all the subjects.", "sql": "SELECT subject_name FROM SUBJECTS;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03796", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "List all the information about course authors and tutors in alphabetical order of the personal name.", "sql": "SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03797", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Sort the information about course authors and tutors in alphabetical order of the personal name.", "sql": "SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_03798", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "List the personal names and family names of all the students in alphabetical order of family name.", "sql": "SELECT personal_name, family_name FROM Students ORDER BY family_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03799", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the personal names and family names of the students? Sort the result in alphabetical order of the family name.", "sql": "SELECT personal_name, family_name FROM Students ORDER BY family_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03800", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "List each test result and its count in descending order of count.", "sql": "SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_03801", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "For each distinct test result, find the number of students who got the result.", "sql": "SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_03802", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the login name of the course author that teaches the course with name \"advanced database\".", "sql": "SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'advanced database';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03803", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Which course author teaches the \"advanced database\" course? Give me his or her login name.", "sql": "SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'advanced database';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03804", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the addresses of the course authors who teach the course with name \"operating system\" or \"data structure\".", "sql": "SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'operating system' OR T2.course_name = 'data structure';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_03805", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the addresses of the course authors who teach either \"operating system\" or \"data structure\" course.", "sql": "SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = 'operating system' OR T2.course_name = 'data structure';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_03808", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the addresses and author IDs of the course authors that teach at least two courses.", "sql": "SELECT T1.address_line_1, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id, T1.address_line_1 HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03809", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Which course authors teach two or more courses? Give me their addresses and author IDs.", "sql": "SELECT T1.address_line_1, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id, T1.address_line_1 HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03810", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the names of courses taught by the tutor who has personal name \"Julio\".", "sql": "SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = 'Julio';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03811", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the names of the courses taught by the tutor whose personal name is \"Julio\"?", "sql": "SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = 'Julio';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03812", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the names and descriptions of courses that belong to the subject named \"Computer Science\".", "sql": "SELECT T1.course_name, T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = 'Computer Science';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03813", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the names and descriptions of the all courses under the \"Computer Science\" subject?", "sql": "SELECT T1.course_name, T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = 'Computer Science';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03814", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the subject ID, subject name, and the corresponding number of available courses for each subject.", "sql": "SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id, T2.subject_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03815", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the subject ID, subject name, and the number of available courses for each subject?", "sql": "SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id, T2.subject_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03816", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order.", "sql": "SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id, T2.subject_name ORDER BY COUNT(*) ASC;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_03817", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "List the subject ID, name of subject and the number of courses available for each subject in ascending order of the course counts.", "sql": "SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id, T2.subject_name ORDER BY COUNT(*) ASC;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_03818", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What is the date of enrollment of the course named \"Spanish\"?", "sql": "SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'Spanish';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03819", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the the date of enrollment of the \"Spanish\" course.", "sql": "SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = 'Spanish';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03820", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What is the name of the course that has the most student enrollment?", "sql": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_03821", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Which course is enrolled in by the most students? Give me the course name.", "sql": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_03822", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the names of the courses that have exactly 1 student enrollment?", "sql": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03823", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the names of the courses that have just one student enrollment.", "sql": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03824", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the descriptions and names of the courses that have student enrollment bigger than 2?", "sql": "SELECT T1.course_description, T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name, T1.course_description HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03825", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Return the descriptions and names of the courses that have more than two students enrolled in.", "sql": "SELECT T1.course_description, T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name, T1.course_description HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03826", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What is the name of each course and the corresponding number of student enrollment?", "sql": "SELECT T1.course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03827", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "List the name and the number of enrolled student for each course.", "sql": "SELECT T1.course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03828", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the enrollment dates of all the tests that have result \"Pass\"?", "sql": "SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Pass';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03829", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the enrollment date for all the tests that have \"Pass\" result.", "sql": "SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Pass';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03830", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the completion dates of all the tests that have result \"Fail\"?", "sql": "SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Fail';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03831", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Return the completion date for all the tests that have \"Fail\" result.", "sql": "SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = 'Fail';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03832", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "List the dates of enrollment and completion of the student with personal name \"Karson\".", "sql": "SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = 'Karson';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03833", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "On what dates did the student whose personal name is \"Karson\" enroll in and complete the courses?", "sql": "SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = 'Karson';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03834", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "List the dates of enrollment and completion of the student with family name \"Zieme\" and personal name \"Bernie\".", "sql": "SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = 'Zieme' AND T2.personal_name = 'Bernie';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_03835", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "On what dates did the student with family name \"Zieme\" and personal name \"Bernie\" enroll in and complete the courses?", "sql": "SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = 'Zieme' AND T2.personal_name = 'Bernie';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_03836", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the student ID and login name of the student with the most course enrollments", "sql": "SELECT T1.student_id, T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id, T2.login_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_03837", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the student ID and login name of the student who are enrolled in the most courses?", "sql": "SELECT T1.student_id, T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id, T2.login_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_03838", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the student ID and personal name of the student with at least two enrollments.", "sql": "SELECT T1.student_id, T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id, T2.personal_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03839", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Which student are enrolled in at least two courses? Give me the student ID and personal name.", "sql": "SELECT T1.student_id, T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id, T2.personal_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03840", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the student ID and middle name for all the students with at most two enrollments.", "sql": "SELECT T1.student_id, T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id, T2.middle_name HAVING COUNT(*) <= 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03841", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the student IDs and middle names of the students enrolled in at most two courses?", "sql": "SELECT T1.student_id, T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id, T2.middle_name HAVING COUNT(*) <= 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_03842", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the personal names of students not enrolled in any course.", "sql": "SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_03843", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Which students not enrolled in any course? Find their personal names.", "sql": "SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_03844", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "How many students did not have any course enrollment?", "sql": "SELECT COUNT(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_03845", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Count the number of students who did not enroll in any course.", "sql": "SELECT COUNT(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_03846", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the common login name of course authors and students.", "sql": "SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_03847", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the login names used both by some course authors and some students?", "sql": "SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_03848", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "Find the common personal name of course authors and students.", "sql": "SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_03849", "db_id": "e_learning", "schema_text": "CREATE TABLE Course_Authors_and_Tutors (author_id BIGINT, author_tutor_ATB BIGINT, login_name VARCHAR /* e.g. 'adam.rippin', 'al75' */, password VARCHAR /* e.g. '02d64f11de97436343a0beba41bfcf69af61be1e', '120ac8a5744f5b710ecaebbd8dd1633e3e33886e' */, personal_name VARCHAR /* e.g. 'Adolf', 'Cathrine' */, middle_name VARCHAR /* e.g. 'Alejandra', 'Amani' */, family_name VARCHAR /* e.g. 'Armstrong', 'Barrows' */, gender_mf BIGINT, address_line_1 VARCHAR);\nCREATE TABLE Courses (course_id BIGINT, author_id BIGINT, subject_id BIGINT, course_name VARCHAR /* e.g. 'AI', 'Art history' */, course_description VARCHAR /* e.g. 'AI', 'Art history' */);\nCREATE TABLE Student_Course_Enrolment (registration_id BIGINT, student_id BIGINT, course_id BIGINT, date_of_enrolment TIMESTAMP, date_of_completion TIMESTAMP);\nCREATE TABLE Student_Tests_Taken (registration_id BIGINT, date_test_taken TIMESTAMP, test_result VARCHAR /* e.g. 'Pass', 'Fail' */);\nCREATE TABLE Students (student_id BIGINT, date_of_registration TIMESTAMP, date_of_latest_logon TIMESTAMP, login_name VARCHAR /* e.g. 'ahartmann', 'annamae.hoppe' */, password VARCHAR /* e.g. '0f37421f02', '1c760b9d5d' */, personal_name VARCHAR /* e.g. 'Alicia', 'Autumn' */, middle_name VARCHAR /* e.g. 'Asa', 'Aubrey' */, family_name VARCHAR /* e.g. 'Carroll', 'Hartmann' */);\nCREATE TABLE Subjects (subject_id BIGINT, subject_name VARCHAR /* e.g. 'Arts', 'Computer Science' */);", "question": "What are the personal names used both by some course authors and some students?", "sql": "SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04096", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "How many companies are headquartered in the US?", "sql": "SELECT COUNT(*) FROM company WHERE Headquarters = 'USA';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_04097", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "List the names of companies by ascending number of sales.", "sql": "SELECT Name FROM company ORDER BY Sales_in_Billion ASC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_04098", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "What are the headquarters and industries of all companies?", "sql": "SELECT Headquarters, Industry FROM company;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04099", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "Show the names of companies in the banking or retailing industry?", "sql": "SELECT Name FROM company WHERE Industry = 'Banking' OR Industry = 'Retailing';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04100", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "What is the maximum and minimum market value of companies?", "sql": "SELECT MAX(Market_Value_in_Billion), MIN(Market_Value_in_Billion) FROM company;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04101", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "What is the headquarter of the company with the largest sales?", "sql": "SELECT Headquarters FROM company ORDER BY Sales_in_Billion DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04102", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "Show the different headquarters and number of companies at each headquarter.", "sql": "SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04103", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "Show the most common headquarter for companies.", "sql": "SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04104", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "Show the headquarters that have at least two companies.", "sql": "SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_04105", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "Show the headquarters that have both companies in banking industry and companies in oil and gas industry.", "sql": "SELECT Headquarters FROM company WHERE Industry = 'Banking' INTERSECT SELECT Headquarters FROM company WHERE Industry = 'Oil and gas';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04106", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "Show the names of companies and of employees.", "sql": "SELECT T3.Name, T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04108", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "Show the names of employees that work for companies with sales bigger than 200.", "sql": "SELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Sales_in_Billion > 200;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04109", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "Show the names of companies and the number of employees they have", "sql": "SELECT T3.Name, COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID GROUP BY T3.Name;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04110", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "List the names of people that are not employed by any company", "sql": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM employment);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04111", "db_id": "company_employee", "schema_text": "CREATE TABLE company (Company_ID DOUBLE, Name VARCHAR /* e.g. 'Agricultural Bank of China', 'BP' */, Headquarters VARCHAR /* e.g. 'USA', 'China' */, Industry VARCHAR /* e.g. 'Oil and gas', 'Banking' */, Sales_in_Billion DOUBLE, Profits_in_Billion DOUBLE, Assets_in_Billion DOUBLE, Market_Value_in_Billion DOUBLE);\nCREATE TABLE employment (Company_ID BIGINT, People_ID BIGINT, Year_working BIGINT);\nCREATE TABLE people (People_ID BIGINT, Age BIGINT, Name VARCHAR /* e.g. 'Brad Lohaus', 'Darryl Kennedy' */, Nationality VARCHAR /* e.g. 'United States', 'United Kindom' */, Graduation_College VARCHAR /* e.g. 'Northeastern', 'California' */);", "question": "list the names of the companies with more than 200 sales in the descending order of sales and profits.", "sql": "SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion, Profits_in_Billion DESC;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04901", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What are the different district names in order of descending city area?", "sql": "SELECT DISTINCT District_name FROM district ORDER BY city_area DESC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_04902", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find the list of page size which have more than 3 product listed", "sql": "SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_04903", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What is the maximum page size for everything that has more than 3 products listed?", "sql": "SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_04904", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find the name and population of district with population between 200000 and 2000000", "sql": "SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04905", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?", "sql": "SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04906", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find the name all districts with city area greater than 10 or population larger than 100000", "sql": "SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04907", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?", "sql": "SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04908", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Which district has the largest population?", "sql": "SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04909", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What is the name of the district with the most residents?", "sql": "SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04910", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Which district has the least area?", "sql": "SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04911", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What is the name of the district with the smallest area?", "sql": "SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04914", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find all types of store and number of them.", "sql": "SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04915", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "For each type of store, how many of them are there?", "sql": "SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04916", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find the names of all stores in Khanewal District.", "sql": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = 'Khanewal District';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04917", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What are the names of all the stores located in Khanewal District?", "sql": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = 'Khanewal District';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04918", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find all the stores in the district with the most population.", "sql": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_04919", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What are the names of all the stores in the largest district by population?", "sql": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_04920", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Which city is the headquarter of the store named \"Blackville\" in?", "sql": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = 'Blackville';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04921", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What city is the headquarter of the store Blackville?", "sql": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = 'Blackville';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04922", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find the number of stores in each city.", "sql": "SELECT t3.headquartered_city, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04923", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "How many stores are headquarted in each city?", "sql": "SELECT t3.headquartered_city, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04924", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find the city with the most number of stores.", "sql": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_04925", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What is the city with the most number of flagship stores?", "sql": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_04926", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What is the average pages per minute color?", "sql": "SELECT AVG(pages_per_minute_color) FROM product;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_04927", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What is the average number of pages per minute color?", "sql": "SELECT AVG(pages_per_minute_color) FROM product;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_04928", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What products are available at store named \"Miramichi\"?", "sql": "SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = 'Miramichi';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04929", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What products are sold at the store named Miramichi?", "sql": "SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = 'Miramichi';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04930", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find products with max page size as \"A4\" and pages per minute color smaller than 5.", "sql": "SELECT product FROM product WHERE max_page_size = 'A4' AND pages_per_minute_color < 5;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04931", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?", "sql": "SELECT product FROM product WHERE max_page_size = 'A4' AND pages_per_minute_color < 5;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04932", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find products with max page size as \"A4\" or pages per minute color smaller than 5.", "sql": "SELECT product FROM product WHERE max_page_size = 'A4' OR pages_per_minute_color < 5;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04933", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?", "sql": "SELECT product FROM product WHERE max_page_size = 'A4' OR pages_per_minute_color < 5;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04934", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find all the product whose name contains the word \"Scanner\".", "sql": "SELECT product FROM product WHERE product ILIKE '%Scanner%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04935", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What are all of the products whose name includes the substring \"Scanner\"?", "sql": "SELECT product FROM product WHERE product ILIKE '%Scanner%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_04936", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find the most prominent max page size among all the products.", "sql": "SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04937", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What is the most common maximum page size?", "sql": "SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04938", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find the name of the products that are not using the most frequently-used max page size.", "sql": "SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04939", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What are the names of all products that are not the most frequently-used maximum page size?", "sql": "SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04940", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find the total population of the districts where the area is bigger than the average city area.", "sql": "SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04941", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What is the total population for all the districts that have an area larger tahn the average city area?", "sql": "SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district);", "source": "spider", "difficulty": "hard"} {"id": "spider_train_04942", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "Find the names of districts where have both city mall and village store type stores.", "sql": "SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'City Mall' INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'Village Store';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_04943", "db_id": "store_product", "schema_text": "CREATE TABLE district (District_ID BIGINT, District_name VARCHAR /* e.g. 'Attock District', 'Bahawalnagar District' */, Headquartered_City VARCHAR /* e.g. 'Attock City', 'Bahawalnagar City' */, City_Population DOUBLE, City_Area DOUBLE);\nCREATE TABLE product (product_id BIGINT, product VARCHAR /* e.g. 'Canon DR-2080C', 'Canon imageFORMULA P-150' */, dimensions VARCHAR /* e.g. '280 x 95 x 40', '289 x 51 x 38' */, dpi DOUBLE, pages_per_minute_color DOUBLE, max_page_size VARCHAR /* e.g. 'A4', '216mm x 355mm' */, interface VARCHAR /* e.g. 'USB 2.0' */);\nCREATE TABLE store (Store_ID BIGINT, Store_Name VARCHAR /* e.g. 'Blackville', 'Doaktown' */, Type VARCHAR /* e.g. 'Village Store', 'City Mall' */, Area_size DOUBLE, Number_of_product_category DOUBLE, Ranking BIGINT);\nCREATE TABLE store_district (Store_ID BIGINT, District_ID BIGINT);\nCREATE TABLE store_product (Store_ID BIGINT, Product_ID BIGINT);", "question": "What are the names of the districts that have both mall and village store style shops?", "sql": "SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'City Mall' INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = 'Village Store';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05516", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "How many products are there?", "sql": "SELECT COUNT(*) FROM products;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05517", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Count the number of products.", "sql": "SELECT COUNT(*) FROM products;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05518", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "How many colors are there?", "sql": "SELECT COUNT(*) FROM ref_colors;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05519", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Count the number of colors.", "sql": "SELECT COUNT(*) FROM ref_colors;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05520", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "How many characteristics are there?", "sql": "SELECT COUNT(*) FROM CHARACTERISTICS;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05521", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Count the number of characteristics.", "sql": "SELECT COUNT(*) FROM CHARACTERISTICS;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05522", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the names and buying prices of all the products?", "sql": "SELECT product_name, typical_buying_price FROM products;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05523", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Return the names and typical buying prices for all products.", "sql": "SELECT product_name, typical_buying_price FROM products;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05524", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "List the description of all the colors.", "sql": "SELECT color_description FROM ref_colors;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05525", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the descriptions for each color?", "sql": "SELECT color_description FROM ref_colors;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05526", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Find the names of all the product characteristics.", "sql": "SELECT DISTINCT characteristic_name FROM CHARACTERISTICS;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05527", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the different names of the product characteristics?", "sql": "SELECT DISTINCT characteristic_name FROM CHARACTERISTICS;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05528", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the names of products with category \"Spices\"?", "sql": "SELECT product_name FROM products WHERE product_category_code = 'Spices';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05529", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Return the names of products in the category 'Spices'.", "sql": "SELECT product_name FROM products WHERE product_category_code = 'Spices';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05530", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "List the names, color descriptions and product descriptions of products with category \"Herbs\".", "sql": "SELECT T1.product_name, T2.color_description, T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = 'Herbs';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05531", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the names, color descriptions, and product descriptions for products in the 'Herbs' category?", "sql": "SELECT T1.product_name, T2.color_description, T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = 'Herbs';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05532", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "How many products are there under the category \"Seeds\"?", "sql": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Seeds';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05533", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Count the number of products in the category 'Seeds'.", "sql": "SELECT COUNT(*) FROM products WHERE product_category_code = 'Seeds';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05536", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What is the category and typical buying price of the product with name \"cumin\"?", "sql": "SELECT product_category_code, typical_buying_price FROM products WHERE product_name = 'cumin';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05537", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Return the category code and typical price of 'cumin'.", "sql": "SELECT product_category_code, typical_buying_price FROM products WHERE product_name = 'cumin';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05538", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Which category does the product named \"flax\" belong to?", "sql": "SELECT product_category_code FROM products WHERE product_name = 'flax';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05539", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What is the code of the category that the product with the name 'flax' belongs to?", "sql": "SELECT product_category_code FROM products WHERE product_name = 'flax';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05540", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What is the name of the product with the color description 'yellow'?", "sql": "SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05541", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Give the name of the products that have a color description 'yellow'.", "sql": "SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05542", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Find the category descriptions of the products whose descriptions include letter 't'.", "sql": "SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description ILIKE '%t%';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05543", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the descriptions of the categories that products with product descriptions that contain the letter t are in?", "sql": "SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description ILIKE '%t%';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05544", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What is the color description of the product with name \"catnip\"?", "sql": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'catnip';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05545", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Give the color description for the product 'catnip'.", "sql": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'catnip';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05546", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What is the color code and description of the product named \"chervil\"?", "sql": "SELECT t1.color_code, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'chervil';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05547", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Return the color code and description for the product with the name 'chervil'.", "sql": "SELECT t1.color_code, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'chervil';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05548", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Find the id and color description of the products with at least 2 characteristics.", "sql": "SELECT t1.product_id, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id, t2.color_description HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05549", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the product ids and color descriptions for products with two or more characteristics?", "sql": "SELECT t1.product_id, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id, t2.color_description HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05550", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "List all the product names with the color description \"white\".", "sql": "SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'white';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05551", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the names of products with 'white' as their color description?", "sql": "SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'white';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05552", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the name and typical buying and selling prices of the products that have color described as \"yellow\"?", "sql": "SELECT t1.product_name, t1.typical_buying_price, t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'yellow';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05553", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Return the names and typical buying and selling prices for products that have 'yellow' as their color description.", "sql": "SELECT t1.product_name, t1.typical_buying_price, t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'yellow';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05554", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "How many characteristics does the product named \"sesame\" have?", "sql": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = 'sesame';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05555", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Count the number of characteristics the product 'sesame' has.", "sql": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = 'sesame';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05556", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "How many distinct characteristic names does the product \"cumin\" have?", "sql": "SELECT COUNT(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05557", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Count the number of different characteristic names the product 'cumin' has.", "sql": "SELECT COUNT(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05558", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are all the characteristic names of product \"sesame\"?", "sql": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05559", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Return the characteristic names of the 'sesame' product.", "sql": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05560", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "List all the characteristic names and data types of product \"cumin\".", "sql": "SELECT t3.characteristic_name, t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'cumin';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05561", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the names and data types of the characteristics of the 'cumin' product?", "sql": "SELECT t3.characteristic_name, t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'cumin';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05562", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "List all characteristics of product named \"sesame\" with type code \"Grade\".", "sql": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame' AND t3.characteristic_type_code = 'Grade';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05563", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'?", "sql": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame' AND t3.characteristic_type_code = 'Grade';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05564", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "How many characteristics does the product named \"laurel\" have?", "sql": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'laurel';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05565", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Count the number of characteristics of the product named 'laurel'.", "sql": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'laurel';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05566", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Find the number of characteristics that the product \"flax\" has.", "sql": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'flax';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05567", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Count the number of characteristics of the 'flax' product.", "sql": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'flax';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05568", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Find the name of the products that have the color description \"red\" and have the characteristic name \"fast\".", "sql": "SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'red' AND t3.characteristic_name = 'fast';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05569", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the names of the products that have a color description of 'red' and the 'fast' characteristic?", "sql": "SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'red' AND t3.characteristic_name = 'fast';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05570", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "How many products have the characteristic named \"hot\"?", "sql": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = 'hot';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05571", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Count the number of products with the 'hot' charactersitic.", "sql": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = 'hot';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05572", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "List the all the distinct names of the products with the characteristic name 'warm'.", "sql": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = 'warm';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05573", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the different product names for products that have the 'warm' characteristic:?", "sql": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = 'warm';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05574", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Find the number of the products that have their color described as \"red\" and have a characteristic named \"slow\".", "sql": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'red' AND t3.characteristic_name = 'slow';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05575", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "How many products have the color description 'red' and the characteristic name 'slow'?", "sql": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'red' AND t3.characteristic_name = 'slow';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05576", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Count the products that have the color description \"white\" or have the characteristic name \"hot\".", "sql": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'white' OR t3.characteristic_name = 'hot';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05577", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "How many products have their color described as 'white' or have a characteristic with the name 'hot'?", "sql": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = 'white' OR t3.characteristic_name = 'hot';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05578", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What is the unit of measuerment of the product category code \"Herbs\"?", "sql": "SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05579", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Return the unit of measure for 'Herb' products.", "sql": "SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05580", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Find the product category description of the product category with code \"Spices\".", "sql": "SELECT product_category_description FROM ref_product_categories WHERE product_category_code = 'Spices';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05581", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What is the description of the product category with the code 'Spices'?", "sql": "SELECT product_category_description FROM ref_product_categories WHERE product_category_code = 'Spices';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_05582", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What is the product category description and unit of measurement of category \"Herbs\"?", "sql": "SELECT product_category_description, unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05583", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Return the description and unit of measurement for products in the 'Herbs' category.", "sql": "SELECT product_category_description, unit_of_measure FROM ref_product_categories WHERE product_category_code = 'Herbs';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05584", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What is the unit of measurement of product named \"cumin\"?", "sql": "SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = 'cumin';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05585", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Give the unit of measure for the product with the name 'cumin'.", "sql": "SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = 'cumin';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05586", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Find the unit of measurement and product category code of product named \"chervil\".", "sql": "SELECT t2.unit_of_measure, t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = 'chervil';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05587", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the unit of measure and category code for the 'chervil' product?", "sql": "SELECT t2.unit_of_measure, t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = 'chervil';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_05588", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Find the product names that are colored 'white' but do not have unit of measurement \"Handful\".", "sql": "SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = 'white' AND t2.unit_of_measure <> 'Handful';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05589", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'?", "sql": "SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = 'white' AND t2.unit_of_measure <> 'Handful';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05590", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What is the description of the color for most products?", "sql": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05591", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Return the color description that is most common across all products.", "sql": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05594", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What is the characteristic name used by most number of the products?", "sql": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05595", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Return the name of the characteristic that is most common across all products.", "sql": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05596", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are the names, details and data types of the characteristics which are never used by any product?", "sql": "SELECT characteristic_name, other_characteristic_details, characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name, t1.other_characteristic_details, t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05597", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Give the names, details, and data types of characteristics that are not found in any product.", "sql": "SELECT characteristic_name, other_characteristic_details, characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name, t1.other_characteristic_details, t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05598", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "What are characteristic names used at least twice across all products?", "sql": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05599", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Give the names of characteristics that are in two or more products?", "sql": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_05600", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "How many colors are never used by any product?", "sql": "SELECT COUNT(*) FROM Ref_colors WHERE color_code NOT IN (SELECT color_code FROM products);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_05601", "db_id": "products_gen_characteristics", "schema_text": "CREATE TABLE Characteristics (characteristic_id BIGINT, characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_data_type VARCHAR /* e.g. 'at', 'aut' */, characteristic_name VARCHAR /* e.g. 'slow', 'cool' */, other_characteristic_details VARCHAR);\nCREATE TABLE Product_Characteristics (product_id BIGINT, characteristic_id BIGINT, product_characteristic_value VARCHAR /* e.g. 'low', 'high' */);\nCREATE TABLE Products (product_id BIGINT, color_code BIGINT, product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_name VARCHAR /* e.g. 'basil', 'borage' */, typical_buying_price VARCHAR /* e.g. '12008702.623', '1284268.0659' */, typical_selling_price VARCHAR /* e.g. '0.1859512', '10377614.847385' */, product_description VARCHAR /* e.g. 'et', 'officia' */, other_product_details VARCHAR);\nCREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR /* e.g. 'Grade', 'Purity' */, characteristic_type_description VARCHAR /* e.g. 'Grade', 'Purity' */);\nCREATE TABLE Ref_Colors (color_code BIGINT, color_description VARCHAR /* e.g. 'black', 'blue' */);\nCREATE TABLE Ref_Product_Categories (product_category_code VARCHAR /* e.g. 'Herbs', 'Seeds' */, product_category_description VARCHAR /* e.g. 'Herbs', 'Seeds' */, unit_of_measure VARCHAR /* e.g. 'Weight - pound,kilo.', 'Handful ' */);", "question": "Count the number of colors that are not used in any products.", "sql": "SELECT COUNT(*) FROM Ref_colors WHERE color_code NOT IN (SELECT color_code FROM products);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06308", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "List every individual's first name, middle name and last name in alphabetical order by last name.", "sql": "SELECT individual_first_name, individual_middle_name, individual_last_name FROM individuals ORDER BY individual_last_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06309", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "What are the first, middle, and last names of all individuals, ordered by last name?", "sql": "SELECT individual_first_name, individual_middle_name, individual_last_name FROM individuals ORDER BY individual_last_name;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06310", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "List all the types of forms.", "sql": "SELECT DISTINCT form_type_code FROM forms;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06311", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "What are the different types of forms?", "sql": "SELECT DISTINCT form_type_code FROM forms;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06314", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Find the payment method and phone of the party with email \"enrico09@example.com\".", "sql": "SELECT payment_method_code, party_phone FROM parties WHERE party_email = 'enrico09@example.com';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06315", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "What is the payment method code and party phone of the party with the email 'enrico09@example.com'?", "sql": "SELECT payment_method_code, party_phone FROM parties WHERE party_email = 'enrico09@example.com';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06318", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "List all the name of organizations in order of the date formed.", "sql": "SELECT organization_name FROM organizations ORDER BY date_formed ASC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06319", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "What are the names of organizations, ordered by the date they were formed, ascending?", "sql": "SELECT organization_name FROM organizations ORDER BY date_formed ASC;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06320", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Find the name of the youngest organization.", "sql": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06321", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "What is the name of the organization that was formed most recently?", "sql": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06322", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Find the last name of the latest contact individual of the organization \"Labour Party\".", "sql": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = 'Labour Party' ORDER BY t2.date_contact_to DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06323", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "What is the last name of the contact individual from the Labour party organization who was contacted most recently?", "sql": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = 'Labour Party' ORDER BY t2.date_contact_to DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06324", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Find the last name of the first ever contact person of the organization with the highest UK Vat number.", "sql": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.uk_vat_number = (SELECT MAX(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06325", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations?", "sql": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.uk_vat_number = (SELECT MAX(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06326", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "How many services are there?", "sql": "SELECT COUNT(*) FROM services;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06327", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Count the number of services.", "sql": "SELECT COUNT(*) FROM services;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06328", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Find name of the services that has never been used.", "sql": "SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id = t2.service_id;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06329", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "What are the names of the services that have never been used?", "sql": "SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id = t2.service_id;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06330", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Find the name of all the cities and states.", "sql": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06331", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "What are the names of all cities and states?", "sql": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06332", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "How many cities are there in state \"Colorado\"?", "sql": "SELECT COUNT(*) FROM addresses WHERE state_province_county = 'Colorado';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06333", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Count the number of cities in the state of Colorado.", "sql": "SELECT COUNT(*) FROM addresses WHERE state_province_county = 'Colorado';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06334", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Find the payment method code used by more than 3 parties.", "sql": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING COUNT(*) > 3;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06335", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "What are the payment method codes that have been used by more than 3 parties?", "sql": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING COUNT(*) > 3;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06336", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Find the name of organizations whose names contain \"Party\".", "sql": "SELECT organization_name FROM organizations WHERE organization_name ILIKE '%Party%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06337", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "What are the names of organizations that contain the word \"Party\"?", "sql": "SELECT organization_name FROM organizations WHERE organization_name ILIKE '%Party%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06338", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "How many distinct payment methods are used by parties?", "sql": "SELECT COUNT(DISTINCT payment_method_code) FROM parties;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06339", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Count the number of different payment method codes used by parties.", "sql": "SELECT COUNT(DISTINCT payment_method_code) FROM parties;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06340", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Which is the email of the party that has used the services the most number of times?", "sql": "SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06341", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Return the party email that has used party services the greatest number of times.", "sql": "SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06342", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Which state can address \"6862 Kaitlyn Knolls\" possibly be in?", "sql": "SELECT state_province_county FROM addresses WHERE line_1_number_building ILIKE '%6862 Kaitlyn Knolls%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06343", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Give the state corresponding to the line number building \"6862 Kaitlyn Knolls\".", "sql": "SELECT state_province_county FROM addresses WHERE line_1_number_building ILIKE '%6862 Kaitlyn Knolls%';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06344", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "What is the name of organization that has the greatest number of contact individuals?", "sql": "SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06345", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Return the name of the organization which has the most contact individuals.", "sql": "SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06346", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "Find the last name of the individuals that have been contact individuals of an organization.", "sql": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06347", "db_id": "e_government", "schema_text": "CREATE TABLE Addresses (address_id BIGINT, line_1_number_building VARCHAR /* e.g. '033 Stracke Parkways', '0399 Colby Extensions' */, town_city VARCHAR /* e.g. 'Breanneberg', 'Carrollland' */, zip_postcode VARCHAR /* e.g. '021', '023' */, state_province_county VARCHAR /* e.g. 'Georgia', 'Louisiana' */, country VARCHAR /* e.g. 'USA' */);\nCREATE TABLE Forms (form_id BIGINT, form_type_code VARCHAR /* e.g. 'Complex', 'Basic' */, service_id BIGINT, form_number BIGINT, form_name VARCHAR /* e.g. 'Account Application', 'Divorce Certificate' */, form_description VARCHAR /* e.g. 'Divorce Certificate', 'Form for Account Application' */);\nCREATE TABLE Individuals (individual_id BIGINT, individual_first_name VARCHAR /* e.g. 'Allene', 'Casper' */, individual_middle_name VARCHAR /* e.g. 'Alberto', 'Alysson' */, inidividual_phone VARCHAR /* e.g. '(030)939-8437x6141', '(121)788-2928' */, individual_email VARCHAR /* e.g. 'allison.lemke@example.org', 'amie.okuneva@example.org' */, individual_address VARCHAR /* e.g. '06409 Beatty Glen Suite 000', '104 Bernier Loop' */, individual_last_name VARCHAR /* e.g. 'Bradtke', 'D''Amore' */);\nCREATE TABLE Organization_Contact_Individuals (individual_id BIGINT, organization_id BIGINT, date_contact_from TIMESTAMP, date_contact_to TIMESTAMP);\nCREATE TABLE Organizations (organization_id BIGINT, date_formed TIMESTAMP, organization_name VARCHAR /* e.g. 'Conservative', 'Green Party' */, uk_vat_number BIGINT);\nCREATE TABLE Parties (party_id BIGINT, payment_method_code VARCHAR /* e.g. 'Cash', 'Cheque' */, party_phone VARCHAR /* e.g. '(211)528-0733x8063', '(919)169-1514x55820' */, party_email VARCHAR /* e.g. 'alanna.boehm@example.net', 'brakus.aliya@example.com' */);\nCREATE TABLE Party_Addresses (party_id BIGINT, address_id BIGINT, date_address_from TIMESTAMP, address_type_code VARCHAR /* e.g. 'Billing', 'Residence' */, date_address_to TIMESTAMP);\nCREATE TABLE Party_Forms (party_id BIGINT, form_id BIGINT, date_completion_started TIMESTAMP, form_status_code VARCHAR /* e.g. 'Not Started', 'Partially Completed' */, date_fully_completed TIMESTAMP);\nCREATE TABLE Party_Services (booking_id BIGINT, customer_id BIGINT, service_id BIGINT, service_datetime TIMESTAMP, booking_made_date TIMESTAMP);\nCREATE TABLE Services (service_id BIGINT, service_type_code VARCHAR /* e.g. 'Education', 'Welfare' */, service_name VARCHAR /* e.g. 'Education', 'Health' */, service_descriptio VARCHAR /* e.g. 'Health', 'Education' */);", "question": "What are the last names of individuals who have been contact individuals for an organization?", "sql": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06385", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "How many accounts do we have?", "sql": "SELECT COUNT(*) FROM Accounts;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06386", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Count the number of accounts.", "sql": "SELECT COUNT(*) FROM Accounts;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06387", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show all account ids and account details.", "sql": "SELECT account_id, account_details FROM Accounts;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06388", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the ids and details of all accounts?", "sql": "SELECT account_id, account_details FROM Accounts;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06389", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "How many statements do we have?", "sql": "SELECT COUNT(*) FROM Statements;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06390", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Count the number of statements.", "sql": "SELECT COUNT(*) FROM Statements;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06391", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "List all statement ids and statement details.", "sql": "SELECT STATEMENT_ID, statement_details FROM Statements;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06392", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the ids and details of all statements?", "sql": "SELECT STATEMENT_ID, statement_details FROM Statements;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06393", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show statement id, statement detail, account detail for accounts.", "sql": "SELECT T1.statement_id, T2.statement_details, T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06394", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the statement ids, statement details, and account details, for all accounts?", "sql": "SELECT T1.statement_id, T2.statement_details, T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06395", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show all statement id and the number of accounts for each statement.", "sql": "SELECT STATEMENT_ID, COUNT(*) FROM Accounts GROUP BY STATEMENT_ID;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06396", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the different statement ids on accounts, and the number of accounts for each?", "sql": "SELECT STATEMENT_ID, COUNT(*) FROM Accounts GROUP BY STATEMENT_ID;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06397", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show the statement id and the statement detail for the statement with most number of accounts.", "sql": "SELECT T1.statement_id, T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id GROUP BY T1.statement_id, T2.statement_details ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06398", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the statement id and statement detail for the statement that has the most corresponding accounts?", "sql": "SELECT T1.statement_id, T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id GROUP BY T1.statement_id, T2.statement_details ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06399", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show the number of documents.", "sql": "SELECT COUNT(*) FROM Documents;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06400", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Count the number of documents.", "sql": "SELECT COUNT(*) FROM Documents;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06401", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "List the document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'.", "sql": "SELECT document_type_code, document_name, document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06402", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'?", "sql": "SELECT document_type_code, document_name, document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06403", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show the ids and names of all documents.", "sql": "SELECT document_id, document_name FROM Documents;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06404", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the ids and names for each of the documents?", "sql": "SELECT document_id, document_name FROM Documents;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06405", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Find names and ids of all documents with document type code BK.", "sql": "SELECT document_name, document_id FROM Documents WHERE document_type_code = 'BK';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06406", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the names and ids of documents that have the type code BK?", "sql": "SELECT document_name, document_id FROM Documents WHERE document_type_code = 'BK';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06407", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "How many documents are with document type code BK for each product id?", "sql": "SELECT COUNT(*), project_id FROM Documents WHERE document_type_code = 'BK' GROUP BY project_id;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06408", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Count the number of documents with the type code BK that correspond to each product id.", "sql": "SELECT COUNT(*), project_id FROM Documents WHERE document_type_code = 'BK' GROUP BY project_id;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06409", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show the document name and the document date for all documents on project with details 'Graph Database project'.", "sql": "SELECT document_name, document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06410", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the names and dates for documents corresponding to project that has the details 'Graph Database project'?", "sql": "SELECT document_name, document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06411", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show project ids and the number of documents in each project.", "sql": "SELECT project_id, COUNT(*) FROM Documents GROUP BY project_id;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06412", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "How many documents correspond with each project id?", "sql": "SELECT project_id, COUNT(*) FROM Documents GROUP BY project_id;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06413", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What is the id of the project with least number of documents?", "sql": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06414", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Return the id of the project that has the fewest corresponding documents.", "sql": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY COUNT(*) ASC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06415", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show the ids for projects with at least 2 documents.", "sql": "SELECT project_id FROM Documents GROUP BY project_id HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06416", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are project ids of projects that have 2 or more corresponding documents?", "sql": "SELECT project_id FROM Documents GROUP BY project_id HAVING COUNT(*) >= 2;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06417", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "List document type codes and the number of documents in each code.", "sql": "SELECT document_type_code, COUNT(*) FROM Documents GROUP BY document_type_code;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06418", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "How many documents are there of each type?", "sql": "SELECT document_type_code, COUNT(*) FROM Documents GROUP BY document_type_code;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06419", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What is the document type code with most number of documents?", "sql": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06420", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Return the code of the document type that is most common.", "sql": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06421", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show the document type code with fewer than 3 documents.", "sql": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING COUNT(*) < 3;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06422", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the codes corresponding to document types for which there are less than 3 documents?", "sql": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING COUNT(*) < 3;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06423", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.", "sql": "SELECT T1.statement_details, T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06424", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents?", "sql": "SELECT T1.statement_details, T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06425", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show all document type codes, document type names, document type descriptions.", "sql": "SELECT document_type_code, document_type_name, document_type_description FROM Ref_document_types;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06426", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the codes, names, and descriptions of the different document types?", "sql": "SELECT document_type_code, document_type_name, document_type_description FROM Ref_document_types;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06427", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What is the document type description for document type named Film?", "sql": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = 'Film';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06428", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Return the description of the document type name 'Film'.", "sql": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = 'Film';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06429", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What is the document type name and the document type description and creation date for all the documents?", "sql": "SELECT T1.document_type_name, T1.document_type_description, T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code = T2.document_type_code;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06430", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Return the type name, type description, and date of creation for each document.", "sql": "SELECT T1.document_type_name, T1.document_type_description, T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code = T2.document_type_code;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06431", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show the number of projects.", "sql": "SELECT COUNT(*) FROM Projects;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06432", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "How many projects are there?", "sql": "SELECT COUNT(*) FROM Projects;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06433", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "List ids and details for all projects.", "sql": "SELECT project_id, project_details FROM Projects;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06434", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the ids and details for each project?", "sql": "SELECT project_id, project_details FROM Projects;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06435", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What is the project id and detail for the project with at least two documents?", "sql": "SELECT T1.project_id, T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id, T1.project_details HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06436", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Return the ids and details corresponding to projects for which there are more than two documents.", "sql": "SELECT T1.project_id, T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id, T1.project_details HAVING COUNT(*) > 2;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06437", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What is the project detail for the project with document \"King Book\"?", "sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id WHERE T2.document_name = 'King Book';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06438", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Give the details of the project with the document name 'King Book'.", "sql": "SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id WHERE T2.document_name = 'King Book';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06439", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "How many budget types do we have?", "sql": "SELECT COUNT(*) FROM Ref_budget_codes;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06440", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Count the number of budget codes.", "sql": "SELECT COUNT(*) FROM Ref_budget_codes;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06441", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "List all budget type codes and descriptions.", "sql": "SELECT budget_type_code, budget_type_description FROM Ref_budget_codes;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06442", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the type codes and descriptions of each budget type?", "sql": "SELECT budget_type_code, budget_type_description FROM Ref_budget_codes;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06443", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What is the description for the budget type with code ORG?", "sql": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = 'ORG';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06444", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Return the description of the budget type that has the code ORG.", "sql": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = 'ORG';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06445", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "How many documents have expenses?", "sql": "SELECT COUNT(*) FROM Documents_with_expenses;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06446", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Count the number of documents with expenses.", "sql": "SELECT COUNT(*) FROM Documents_with_expenses;", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06447", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the document ids for the budget type code 'SF'?", "sql": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06448", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Give the ids of documents with expenses that have the budget code 'SF'.", "sql": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF';", "source": "spider", "difficulty": "easy"} {"id": "spider_train_06449", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show the budget type code and description and the corresponding document id.", "sql": "SELECT T2.budget_type_code, T2.budget_type_description, T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06450", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Return the budget type codes, budget type descriptions and document ids for documents with expenses.", "sql": "SELECT T2.budget_type_code, T2.budget_type_description, T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06451", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show ids for all documents with budget types described as 'Government'.", "sql": "SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code = T2.Budget_Type_code WHERE T2.budget_type_Description = 'Government';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06452", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Give the ids for documents that have the budget description 'Government'.", "sql": "SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code = T2.Budget_Type_code WHERE T2.budget_type_Description = 'Government';", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06453", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show budget type codes and the number of documents in each budget type.", "sql": "SELECT budget_type_code, COUNT(*) FROM Documents_with_expenses GROUP BY budget_type_code;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06454", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the different budget type codes, and how many documents are there for each?", "sql": "SELECT budget_type_code, COUNT(*) FROM Documents_with_expenses GROUP BY budget_type_code;", "source": "spider", "difficulty": "medium"} {"id": "spider_train_06455", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What is the budget type code with most number of documents.", "sql": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06456", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Give the budget type code that is most common among documents with expenses.", "sql": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY COUNT(*) DESC LIMIT 1;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06457", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the ids of documents which don't have expense budgets?", "sql": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06458", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Return the ids of documents that do not have expenses.", "sql": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06459", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Show ids for all documents in type CV without expense budgets.", "sql": "SELECT document_id FROM Documents WHERE document_type_code = 'CV' EXCEPT SELECT document_id FROM Documents_with_expenses;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06460", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the ids of documents with the type code CV that do not have expenses.", "sql": "SELECT document_id FROM Documents WHERE document_type_code = 'CV' EXCEPT SELECT document_id FROM Documents_with_expenses;", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06461", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the ids of documents with letter 's' in the name with any expense budgets.", "sql": "SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id = T2.document_id WHERE T1.document_name ILIKE '%s%';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06462", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Give the ids of documents that have expenses and contain the letter s in their names.", "sql": "SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id = T2.document_id WHERE T1.document_name ILIKE '%s%';", "source": "spider", "difficulty": "hard"} {"id": "spider_train_06463", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "How many documents do not have any expense?", "sql": "SELECT COUNT(*) FROM Documents WHERE document_id NOT IN (SELECT document_id FROM Documents_with_expenses);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06464", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Count the number of documents that do not have expenses.", "sql": "SELECT COUNT(*) FROM Documents WHERE document_id NOT IN (SELECT document_id FROM Documents_with_expenses);", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06465", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "What are the dates for the documents with both 'GV' type and 'SF' type expenses?", "sql": "SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF';", "source": "spider", "difficulty": "extra"} {"id": "spider_train_06466", "db_id": "cre_Docs_and_Epenses", "schema_text": "CREATE TABLE Accounts (Account_ID BIGINT, Statement_ID BIGINT, Account_Details DOUBLE);\nCREATE TABLE Documents (Document_ID BIGINT, Document_Type_Code VARCHAR /* e.g. 'BK', 'PP' */, Project_ID BIGINT, Document_Date TIMESTAMP, Document_Name VARCHAR /* e.g. 'Review on UK files', 'Book on USA files' */, Document_Description VARCHAR, Other_Details VARCHAR);\nCREATE TABLE Documents_with_Expenses (Document_ID BIGINT, Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Document_Details VARCHAR /* e.g. 'government', 'organization' */);\nCREATE TABLE Projects (Project_ID BIGINT, Project_Details VARCHAR /* e.g. 'Graph Database project', 'Human Resource project' */);\nCREATE TABLE Ref_Budget_Codes (Budget_Type_Code VARCHAR /* e.g. 'GV', 'ORG' */, Budget_Type_Description VARCHAR /* e.g. 'Government', 'Organisation' */);\nCREATE TABLE Ref_Document_Types (Document_Type_Code VARCHAR /* e.g. 'BK', 'CV' */, Document_Type_Name VARCHAR /* e.g. 'Book', 'CV' */, Document_Type_Description VARCHAR /* e.g. 'excellent', 'fun' */);\nCREATE TABLE Statements (Statement_ID BIGINT, Statement_Details VARCHAR /* e.g. 'Open Project', 'Private Project' */);", "question": "Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'.", "sql": "SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF';", "source": "spider", "difficulty": "extra"}