[ { "prediction": "dog_kennels | select count ( distinct dog_id ) from treatments", "gold_parse": "SELECT count(DISTINCT dog_id) FROM Treatments", "question": "How many dogs went through any treatments?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Breeds", "predicted_parse_explanation": "['find the number of rows in Breeds table']", "feedback": "Change breeds table with treatments table .", "context": "How many dogs went through any treatments? || select count ( * ) from breeds || dog_kennels | treatments : dog_id || Change breeds table with treatments table.", "label": "dog_kennels | select count ( distinct dog_id ) from treatments" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the high schooler who has the greatest number of friends?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler GROUP BY grade ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of grade in Highschooler table', 'Step 2: find name of Highschooler table with largest value in the results of step 1']", "feedback": "In step 1, the grade and high schooler table should be replace with student Id and friend table respectively.", "context": "What is the name of the high schooler who has the greatest number of friends? || select name from highschooler group by grade order by count ( * ) desc limit 1 || network_1 | highschooler : name, id | friend : student_id || In step 1, the grade and high schooler table should be replace with student Id and friend table respectively.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id order by count ( * ) desc limit 1" }, { "prediction": "concert_singer | select name, country from singer where song_name like '%Hey%'", "gold_parse": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'", "question": "what is the name and nation of the singer who have a song having 'Hey' in its name?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Name , Country FROM singer WHERE Name LIKE \"Hey\"", "predicted_parse_explanation": "['find the Name, Country of singer table for which Name contains Hey']", "feedback": "I want song name as Hey.", "context": "what is the name and nation of the singer who have a song having 'Hey' in its name? || select name, country from singer where name like 'Hey' || concert_singer | singer : name, country, song_name ( \"%Hey%\" ) || I want song name as Hey.", "label": "concert_singer | select name, country from singer where song_name like '%Hey%'" }, { "prediction": "world_1 | select name, population, headofstate from country order by surfacearea desc limit 1", "gold_parse": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", "question": "Give the name, population, and head of state for the country that has the largest area.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name , Population , Continent FROM country ORDER BY SurfaceArea Desc LIMIT 1", "predicted_parse_explanation": "['find the Name, Population, Continent of country table with largest value of SurfaceArea']", "feedback": "swap continent with head of state because it is not required. ", "context": "Give the name, population, and head of state for the country that has the largest area. || select name, population, continent from country order by surfacearea desc limit 1 || world_1 | country : name, population, headofstate, surfacearea || swap continent with head of state because it is not required.", "label": "world_1 | select name, population, headofstate from country order by surfacearea desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from templates", "gold_parse": "SELECT count(*) FROM Templates", "question": "How many templates do we have?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "We have to use templates table instead of reference template types table.", "context": "How many templates do we have? || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | templates : || We have to use templates table instead of reference template types table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from templates" }, { "prediction": "tvshow | select title from cartoon where directed_by = 'Ben Jones'", "gold_parse": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\"", "question": "What are the names of all cartoons directed by Ben Jones?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Title FROM Cartoon WHERE Written_by = \"Ben Jones\" AND Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['find Title of Cartoon table whose Written_by equals Ben Jones and Directed_by equals Ben Jones']", "feedback": "Delete the phrase and written by Ben Jones.", "context": "What are the names of all cartoons directed by Ben Jones? || select title from cartoon where written_by = 'Ben Jones' and directed_by = 'Ben Jones' || tvshow | cartoon : title, directed_by ( \"Ben Jones\" ) || Delete the phrase and written by Ben Jones.", "label": "tvshow | select title from cartoon where directed_by = 'Ben Jones'" }, { "prediction": "orchestra | select major_record_format from orchestra order by major_record_format asc", "gold_parse": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC", "question": "What are the major record formats of orchestras, sorted by their frequency?", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT Type FROM performance ORDER BY Share Desc", "predicted_parse_explanation": "['find the Type of performance table ordered descending by Share']", "feedback": "find the major record format of orchestra ordered ascending by share .", "context": "What are the major record formats of orchestras, sorted by their frequency? || select type from performance order by share desc || orchestra | orchestra : major_record_format || find the major record format of orchestra ordered ascending by share.", "label": "orchestra | select major_record_format from orchestra group by major_record_format order by count ( * ) asc" }, { "prediction": "world_1 | select countrycode from countrylanguage where language!= 'english'", "gold_parse": "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "question": "What are the country codes for countries that do not speak English?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Continent FROM country AS T1 EXCEPT SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\"", "predicted_parse_explanation": "['Step 1: find the Continent of country table', 'Step 2: For each row in country table, find the corresponding rows in countrylanguage table', 'Step 3: find Continent of the results of step 2 whose Language equals English', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "Need to change continent with code in both step 1 and 3.", "context": "What are the country codes for countries that do not speak English? || select country.continent from country except select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' || world_1 | countrylanguage : countrycode, language ( \"english\" ) || Need to change continent with code in both step 1 and 3.", "label": "world_1 | select countrycode from countrylanguage except select countrycode from countrylanguage where language = 'English'" }, { "prediction": "flight_2 | select flightno from flights where sourceairport = 'APG'", "gold_parse": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"", "question": "What are flight numbers of flights departing from Airport \"APG\"?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T2.FlightNo FROM airports AS T1 JOIN flights AS T2 ON T1.AirportCode = T2.SourceAirport WHERE T1.AirportName = \"APG\"", "predicted_parse_explanation": "['Step 1: For each row in airports table, find the corresponding rows in flights table', 'Step 2: find FlightNo of the results of step 1 whose AirportName equals APG']", "feedback": "source airport should be APG not airport name .", "context": "What are flight numbers of flights departing from Airport \"APG\"? || select flights.flightno from airports join flights on airports.airportcode = flights.sourceairport where airports.airportname = 'APG' || flight_2 | flights : flightno, sourceairport ( \"APG\" ) || source airport should be APG not airport name.", "label": "flight_2 | select flightno from flights where sourceairport = 'APG'" }, { "prediction": "student_transcripts_tracking | select departments.department_name, degree_programs.department_id from departments join degree_programs on departments.department_id = degree_programs.department_id group by departments.department_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.department_name , T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY count(*) DESC LIMIT 1", "question": "Which department offers the most number of degrees? List department name and id.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT department_name , department_id FROM Departments GROUP BY department_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of department_id in Departments table', 'Step 2: find department_name, department_id of Departments table with largest value in the results of step 1']", "feedback": "I want table of degree programs in place of table of departments.", "context": "Which department offers the most number of degrees? List department name and id. || select department_name, department_id from departments group by department_id order by count ( * ) desc limit 1 || student_transcripts_tracking | departments : department_name, department_id | degree_programs : department_id || I want table of degree programs in place of table of departments.", "label": "student_transcripts_tracking | select departments.department_name, degree_programs.department_id from degree_programs join departments on degree_programs.department_id = departments.department_id group by degree_programs.department_id order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select count ( * ) from airports join flights on airports.city = flights.destairport where airports.city = 'Aberdeen'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "question": "How many flights depart from City Aberdeen?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE City = \"Aberdeen\"", "predicted_parse_explanation": "['find the number of rows in airports table whose City equals Aberdeen']", "feedback": "in flights table sourceairport's equivalent city is aberdeen look for such rows number.", "context": "How many flights depart from City Aberdeen? || select count ( * ) from airports where city = 'Aberdeen' || flight_2 | airports : city ( \"Aberdeen\" ) | flights : destairport || in flights table sourceairport's equivalent city is aberdeen look for such rows number.", "label": "flight_2 | select count ( * ) from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'" }, { "prediction": "dog_kennels | select charge_type, charge_amount from charges", "gold_parse": "SELECT charge_type , charge_amount FROM Charges", "question": "List each charge type and its amount.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.treatment_type_code , T1.charge_amount FROM Charges AS T1 JOIN Treatment_Types AS T2", "predicted_parse_explanation": "['Step 1: For each row in Charges table, find the corresponding rows in Treatment_Types table', 'Step 2: find treatment_type_code, charge_amount of the results of step 1']", "feedback": "You should remove 'treatment type' and insert 'charger type' in its place.", "context": "List each charge type and its amount. || select treatment_types.treatment_type_code, charges.charge_amount from charges join treatment_types as treatment_types || dog_kennels | charges : charge_type, charge_amount || You should remove 'treatment type' and insert 'charger type' in its place.", "label": "dog_kennels | select charge_type, charge_amount from charges" }, { "prediction": "car_1 | select car_makers.maker, model_list.model from car_makers join model_list on car_makers.id = model_list.maker", "gold_parse": "SELECT Maker , Model FROM MODEL_LIST", "question": "What are all the makers and models?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Maker FROM car_makers", "predicted_parse_explanation": "['find the Maker of car_makers table']", "feedback": "And also Corresponding model of model list table .", "context": "What are all the makers and models? || select maker from car_makers || car_1 | car_makers : maker, id | model_list : model, maker || And also Corresponding model of model list table.", "label": "car_1 | select maker, model from model_list" }, { "prediction": "wta_1 | select winner_name, loser_name from matches order by minutes asc limit 1", "gold_parse": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1", "question": "What are the names of the winner and loser who played in the longest match?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T2.winner_name , T1.last_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id ORDER BY T2.winner_name Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find winner_name, last_name of the results of step 1 with smallest value of winner_name']", "feedback": "In step 2 Substitute last name with loser name , smallest value of winner name with largest value of minutes .", "context": "What are the names of the winner and loser who played in the longest match? || select matches.winner_name, players.last_name from players join matches on players.player_id = matches.loser_id order by matches.winner_name asc limit 1 || wta_1 | matches : winner_name, loser_name, minutes || In step 2 Substitute last name with loser name, smallest value of winner name with largest value of minutes.", "label": "wta_1 | select winner_name, loser_name from matches order by minutes desc limit 1" }, { "prediction": "tvshow | select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.id where cartoon.written_by = 'Todd Casey'", "gold_parse": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "question": "What are the countries that have cartoons on TV that were written by Todd Casey?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Todd Casey\" AND T2.Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find Country of the results of step 1 whose Written_by equals Todd Casey and Directed_by equals Ben Jones']", "feedback": "Remove \"and directed by equals Ben Jones\".", "context": "What are the countries that have cartoons on TV that were written by Todd Casey? || select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey' and cartoon.directed_by = 'Ben Jones' || tvshow | tv_channel : country, id | cartoon : id, written_by ( \"Todd Casey\" ) || Remove \"and directed by equals Ben Jones\".", "label": "tvshow | select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" }, { "prediction": "tvshow | select count ( * ) from cartoon where written_by = 'Joseph Kuhr'", "gold_parse": "SELECT count(*) FROM Cartoon WHERE Written_by = \"Joseph Kuhr\"", "question": "What is the number of cartoones written by Joseph Kuhr?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Cartoon WHERE Written_by = \"Joseph Kuhr\" AND Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['find the number of rows in Cartoon table whose Written_by equals Joseph Kuhr and Directed_by equals Ben Jones']", "feedback": "Skip \" and directed by equals Ben Jones \".", "context": "What is the number of cartoones written by Joseph Kuhr? || select count ( * ) from cartoon where written_by = 'Joseph Kuhr' and directed_by = 'Ben Jones' || tvshow | cartoon : written_by ( \"Joseph Kuhr\" ) || Skip \" and directed by equals Ben Jones \".", "label": "tvshow | select count ( * ) from cartoon where written_by = 'Joseph Kuhr'" }, { "prediction": "course_teach | select count ( * ) from teacher", "gold_parse": "SELECT count(*) FROM teacher", "question": "How many teachers are there?", "db_id": "course_teach", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "course", "teacher", "course_arrange" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2 ], "column_name": [ "*", "Course_ID", "Staring_Date", "Course", "Teacher_ID", "Name", "Age", "Hometown", "Course_ID", "Teacher_ID", "Grade" ] }, "db_foreign_keys": { "column_id": [ 9, 8 ], "other_column_id": [ 4, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM course", "predicted_parse_explanation": "['find the number of rows in course table']", "feedback": "Swap between course and teacher table.", "context": "How many teachers are there? || select count ( * ) from course || course_teach | teacher : || Swap between course and teacher table.", "label": "course_teach | select count ( * ) from teacher" }, { "prediction": "tvshow | select production_code, channel from cartoon order by original_air_date desc limit 1", "gold_parse": "SELECT production_code , channel FROM cartoon ORDER BY original_air_date LIMIT 1", "question": "What is the produdction code and channel of the most recent cartoon?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Title , Channel FROM Cartoon GROUP BY Channel ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Channel in Cartoon table', 'Step 2: find Title, Channel of Cartoon table with largest value in the results of step 1']", "feedback": "You need to order based on original air date and use production code in place of title.", "context": "What is the produdction code and channel of the most recent cartoon? || select title, channel from cartoon group by channel order by count ( * ) desc limit 1 || tvshow | cartoon : production_code, channel, original_air_date || You need to order based on original air date and use production code in place of title.", "label": "tvshow | select production_code, channel from cartoon order by original_air_date asc limit 1" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airport group by airlines.airline having count ( * ) < 200", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200", "question": "Find all airlines that have fewer than 200 flights.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines GROUP BY Airline HAVING Count ( * ) > = 200", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Airline in airlines table', 'Step 2: find Airline in airlines table whose corresponding value in step 1 is greater than or equals 200']", "feedback": "In step 1. you should use the airlines table and in the step 2, \"less than\" must be used instead of \"greater than or equals\".", "context": "Find all airlines that have fewer than 200 flights. || select airline from airlines group by airline having count ( * ) > = 200 || flight_2 | airlines : airline, uid | flights : airline || In step 1. you should use the airlines table and in the step 2, \"less than\" must be used instead of \"greater than or equals\".", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) < 200" }, { "prediction": "world_1 | select countrycode from countrylanguage where language = 'English' or language = 'Dutch' isofficial", "gold_parse": "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND IsOfficial = \"T\" UNION SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\" AND IsOfficial = \"T\"", "question": "Which countries have either English or Dutch as an official language?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE LocalName = \"T\" OR LocalName = \"Dutch\"", "predicted_parse_explanation": "['find Continent of country table whose LocalName equals Dutch or LocalName equals T']", "feedback": "Change continent with name name , Ensure language equals English or language equals Dutch and is official equals T .", "context": "Which countries have either English or Dutch as an official language? || select continent from country where localname = 'T' or localname = 'Dutch' || world_1 | countrylanguage : countrycode, language ( \"Dutch\" ), isofficial || Change continent with name name, Ensure language equals English or language equals Dutch and is official equals T.", "label": "world_1 | select * from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and isofficial = 'T' union select * from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' and isofficial = 'T'" }, { "prediction": "singer | select citizenship from singer where birth_year < 1945 intersect select citizenship from singer where birth_year > 1955", "gold_parse": "SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955", "question": "Show the citizenship shared by singers with birth year before 1945 and after 1955.", "db_id": "singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "singer", "song" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Singer_ID", "Name", "Birth_Year", "Net_Worth_Millions", "Citizenship", "Song_ID", "Title", "Singer_ID", "Sales", "Highest_Position" ] }, "db_foreign_keys": { "column_id": [ 8 ], "other_column_id": [ 1 ] }, "predicted_parse_with_values": "SELECT Citizenship FROM singer WHERE Birth_Year > 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year < 1955", "predicted_parse_explanation": "['Step 1: find the Citizenship of singer table for which Birth_Year greater than 1945', 'Step 2: find the Citizenship of singer table for which Birth_Year less than 1955', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Verify birth year less than 1945 in step 1 , Ensure birth year greater than 1955 in step 2.", "context": "Show the citizenship shared by singers with birth year before 1945 and after 1955. || select citizenship from singer where birth_year > 1945 intersect select citizenship from singer where birth_year < 1955 || singer | singer : citizenship, birth_year ( 1955 ) || Verify birth year less than 1945 in step 1, Ensure birth year greater than 1955 in step 2.", "label": "singer | select citizenship from singer where birth_year < 1945 intersect select citizenship from singer where birth_year > 1955" }, { "prediction": "car_1 | select count ( * ) from countries", "gold_parse": "SELECT count(*) FROM COUNTRIES", "question": "How many countries exist?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM continents", "predicted_parse_explanation": "['find the number of rows in continents table']", "feedback": "Countries need to be put on behalf of continents.", "context": "How many countries exist? || select count ( * ) from continents || car_1 | countries : || Countries need to be put on behalf of continents.", "label": "car_1 | select count ( * ) from countries" }, { "prediction": "cre_Doc_Template_Mgt | select paragraphs.paragraph_id, paragraphs.paragraph_text from documents join paragraphs on documents.document_id = paragraphs.document_id where documents.document_name = 'Welcome to NY'", "gold_parse": "SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'", "question": "Show all paragraph ids and texts for the document with name 'Welcome to NY'.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID , Template_ID FROM Documents WHERE Document_Name = \"Welcome to NY\"", "predicted_parse_explanation": "['find the Document_ID, Template_ID of Documents table for which Document_Name equals Welcome to NY']", "feedback": "Paragraph id , paragraph text and paragraphs table have to be use not the document id , template id and documents table.", "context": "Show all paragraph ids and texts for the document with name 'Welcome to NY'. || select document_id, template_id from documents where document_name = 'Welcome to NY' || cre_Doc_Template_Mgt | paragraphs : paragraph_id, paragraph_text, document_id | documents : document_id, document_name ( \"Welcome to NY\" ) || Paragraph id, paragraph text and paragraphs table have to be use not the document id, template id and documents table.", "label": "cre_Doc_Template_Mgt | select paragraphs.paragraph_id, paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Welcome to NY'" }, { "prediction": "world_1 | select population, lifeexpectancy from country where continent = 'Brazil'", "gold_parse": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"", "question": "What are the population and life expectancies in Brazil?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Population , GNPOld FROM country WHERE Continent = \"Brazil\"", "predicted_parse_explanation": "['find the Population, GNPOld of country table for which Continent equals Brazil']", "feedback": "Swap GNPOid and continent with life expectancy and name name .", "context": "What are the population and life expectancies in Brazil? || select population, gnpold from country where continent = 'Brazil' || world_1 | country : population, lifeexpectancy, continent ( \"Brazil\" ) || Swap GNPOid and continent with life expectancy and name name.", "label": "world_1 | select population, lifeexpectancy from country where name = 'Brazil'" }, { "prediction": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba' group by countrylanguage.language order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\" ORDER BY Percentage DESC LIMIT 1", "question": "Which language is the most popular in Aruba?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Code2 FROM country GROUP BY Code2 ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Code2 in country table', 'Step 2: find Code2 of country table with largest value in the results of step 1']", "feedback": "you have to calculate the percentage in step 1 and use language in countrylanguage. be certain the name is aruba. ", "context": "Which language is the most popular in Aruba? || select code2 from country group by code2 order by count ( * ) desc limit 1 || world_1 | countrylanguage : language, countrycode | country : code, name ( \"Aruba\" ) || you have to calculate the percentage in step 1 and use language in countrylanguage. be certain the name is aruba.", "label": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba' order by percentage desc limit 1" }, { "prediction": "dog_kennels | select count ( distinct professional_id ) from treatments union select dog_id from treatments", "gold_parse": "SELECT count(DISTINCT professional_id) FROM Treatments", "question": "How many professionals have performed any treatment to dogs?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Dogs WHERE weight = 7.57", "predicted_parse_explanation": "['find the number of rows in Dogs table whose weight equals 7.57']", "feedback": "Find number of rows of distinct professional id in treatments table .", "context": "How many professionals have performed any treatment to dogs? || select count ( * ) from dogs where weight = 7.57 || dog_kennels | treatments : professional_id, dog_id || Find number of rows of distinct professional id in treatments table.", "label": "dog_kennels | select count ( distinct professional_id ) from treatments" }, { "prediction": "network_1 | select highschooler.name from highschooler join likes on highschooler.id = likes.student_id group by highschooler.id order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the high schooler who has the greatest number of likes?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler GROUP BY grade ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of grade in Highschooler table', 'Step 2: find name of Highschooler table with largest value in the results of step 1']", "feedback": "Ensure to find student id in likes table in step 1.", "context": "What is the name of the high schooler who has the greatest number of likes? || select name from highschooler group by grade order by count ( * ) desc limit 1 || network_1 | highschooler : name, id | likes : student_id || Ensure to find student id in likes table in step 1.", "label": "network_1 | select highschooler.name from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id order by count ( * ) desc limit 1" }, { "prediction": "student_transcripts_tracking | select count ( * ) from courses", "gold_parse": "SELECT count(*) FROM Courses", "question": "How many courses in total are listed?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Addresses", "predicted_parse_explanation": "['find the number of rows in Addresses table']", "feedback": "I want table of courses instead of table of addresses.", "context": "How many courses in total are listed? || select count ( * ) from addresses || student_transcripts_tracking | courses : || I want table of courses instead of table of addresses.", "label": "student_transcripts_tracking | select count ( * ) from courses" }, { "prediction": "battle_death | select death.note from death join battle on death.id = battle.id where battle.name like '%East%'", "gold_parse": "SELECT note FROM death WHERE note LIKE '%East%'", "question": "What are the notes of the death events which has substring 'East'?", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT T3.note FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id WHERE T1.date LIKE \"East\"", "predicted_parse_explanation": "['Step 1: For each row in ship table, find corresponding rows in battle table and in death table', 'Step 2: find note of the results of step 1 whose date contains East']", "feedback": "Search for the word 'east' from the note in step 2.", "context": "What are the notes of the death events which has substring 'East'? || select death.note from battle join ship on battle.id = ship.lost_in_battle join death on ship.id = death.caused_by_ship_id where battle.date like 'East' || battle_death | death : note, id | battle : id, name ( \"%East%\" ) || Search for the word 'east' from the note in step 2.", "label": "battle_death | select note from death where note like '%East%'" }, { "prediction": "course_teach | select count ( * ) from teacher", "gold_parse": "SELECT count(*) FROM teacher", "question": "How many teachers are there?", "db_id": "course_teach", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "course", "teacher", "course_arrange" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2 ], "column_name": [ "*", "Course_ID", "Staring_Date", "Course", "Teacher_ID", "Name", "Age", "Hometown", "Course_ID", "Teacher_ID", "Grade" ] }, "db_foreign_keys": { "column_id": [ 9, 8 ], "other_column_id": [ 4, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM course", "predicted_parse_explanation": "['find the number of rows in course table']", "feedback": "Exchange course table with teacher table .", "context": "How many teachers are there? || select count ( * ) from course || course_teach | teacher : || Exchange course table with teacher table.", "label": "course_teach | select count ( * ) from teacher" }, { "prediction": "employee_hire_evaluation | select name from employee where employee_id not in ( select employee_id from evaluation )", "gold_parse": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)", "question": "What are the names of the employees who never received any evaluation?", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT Name FROM employee EXCEPT SELECT Name FROM employee", "predicted_parse_explanation": "['Step 1: find the Name of employee table', 'Step 2: find the Name of employee table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "Ensure employee present in evaluation in step 2.", "context": "What are the names of the employees who never received any evaluation? || select name from employee except select name from employee || employee_hire_evaluation | employee : name, employee_id | evaluation : employee_id || Ensure employee present in evaluation in step 2.", "label": "employee_hire_evaluation | select name from employee where employee_id not in ( select employee_id from evaluation )" }, { "prediction": "dog_kennels | select professionals.first_name from professionals join owners on professionals.role_code = owners.role_code join dogs on owners.owner_id = dogs.owner_id except select professionals.first_name from professionals join owners on professionals.role_code = owners.role_code", "gold_parse": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs", "question": "Find the first names that are used for professionals or owners but are not used as dog names.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T1.first_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.name = \"Kacey\" EXCEPT SELECT T1.first_name FROM Owners AS T1", "predicted_parse_explanation": "['Step 1: For each row in Owners table, find the corresponding rows in Dogs table', 'Step 2: find first_name of the results of step 1 whose name equals Kacey', 'Step 3: find the first_name of Owners table', 'Step 4: show the rows that are in the results of step 2 but not in the results of step 3']", "feedback": "Look for the owners and professionals first name that are not present in the name of Dogs table.", "context": "Find the first names that are used for professionals or owners but are not used as dog names. || select owners.first_name from owners join dogs on owners.owner_id = dogs.owner_id where dogs.name = 'Kacey' except select owners.first_name from owners as owners || dog_kennels | professionals : first_name, role_code | owners : first_name, owner_id | dogs : name, dog_id || Look for the owners and professionals first name that are not present in the name of Dogs table.", "label": "dog_kennels | select first_name from professionals union select first_name from owners except select name from dogs" }, { "prediction": "network_1 | select friend.student_id from friend join likes on friend.friend_id = likes.student_id intersect select friend.student_id from friend join likes on friend.friend_id = likes.student_id", "gold_parse": "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes", "question": "Show the ids of high schoolers who have friends and are also liked by someone else.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.ID FROM Highschooler AS T1 INTERSECT SELECT T2.liked_id FROM Likes AS T2", "predicted_parse_explanation": "['Step 1: find the ID of Highschooler table', 'Step 2: find the liked_id of Likes table', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Confirm that the id of Highschooler table is available there in both friend and likes table.", "context": "Show the ids of high schoolers who have friends and are also liked by someone else. || select highschooler.id from highschooler intersect select likes.liked_id from likes as likes || network_1 | friend : student_id, friend_id | likes : student_id || Confirm that the id of Highschooler table is available there in both friend and likes table.", "label": "network_1 | select student_id from friend intersect select liked_id from likes" }, { "prediction": "wta_1 | select loser_name, winner_name from matches order by minutes desc limit 1", "gold_parse": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1", "question": "find the names of loser and winner who played in the match with greatest number of minutes.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT tourney_name , loser_entry FROM matches ORDER BY minutes Desc LIMIT 1", "predicted_parse_explanation": "['find the tourney_name, loser_entry of matches table with largest value of minutes']", "feedback": "The tourney name and loser entry are wrong . It has to be winner name and loser name instead .", "context": "find the names of loser and winner who played in the match with greatest number of minutes. || select tourney_name, loser_entry from matches order by minutes desc limit 1 || wta_1 | matches : loser_name, winner_name, minutes || The tourney name and loser entry are wrong. It has to be winner name and loser name instead.", "label": "wta_1 | select winner_name, loser_name from matches order by minutes desc limit 1" }, { "prediction": "dog_kennels | select owners.owner_id, owners.first_name, owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id group by owners.owner_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "question": "Return the owner id, first name and last name of the owner who has the most dogs.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT owner_id , first_name , last_name FROM Owners GROUP BY owner_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of owner_id in Owners table', 'Step 2: find owner_id, first_name, last_name of Owners table with largest value in the results of step 1']", "feedback": "Replace owners table with dogs table in step 1.", "context": "Return the owner id, first name and last name of the owner who has the most dogs. || select owner_id, first_name, last_name from owners group by owner_id order by count ( * ) desc limit 1 || dog_kennels | owners : owner_id, first_name, last_name | dogs : owner_id || Replace owners table with dogs table in step 1.", "label": "dog_kennels | select dogs.owner_id, owners.first_name, owners.last_name from dogs join owners on dogs.owner_id = owners.owner_id group by dogs.owner_id order by count ( * ) desc limit 1" }, { "prediction": "dog_kennels | select owners.owner_id, owners.zip_code from owners join dogs on owners.owner_id = dogs.owner_id group by owners.owner_id order by sum ( dogs.cost_of_treatment ) desc limit 1", "gold_parse": "SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1", "question": "Find the owner id and zip code of the owner who spent the most money in total for his or her dogs.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id GROUP BY T2.owner_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Owners table, find the corresponding rows in Dogs table', \"Step 2: find the number of rows of each value of Dogs's owner_id in the results of step 1\", \"Step 3: find Dogs's owner_id, zip_code of step 1 results with largest value in the results of step 2\"]", "feedback": "Make sure to search for all dogs total treatment date hold by owner id and also include treatments table.", "context": "Find the owner id and zip code of the owner who spent the most money in total for his or her dogs. || select dogs.owner_id, owners.zip_code from owners join dogs on owners.owner_id = dogs.owner_id group by dogs.owner_id order by count ( * ) desc limit 1 || dog_kennels | owners : owner_id, zip_code | dogs : owner_id, cost_of_treatment || Make sure to search for all dogs total treatment date hold by owner id and also include treatments table.", "label": "dog_kennels | select owners.owner_id, owners.zip_code from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id group by owners.owner_id order by sum ( treatments.cost_of_treatment ) desc limit 1" }, { "prediction": "dog_kennels | select treatment_types.treatment_type_description from treatment_types join treatments on treatment_types.treatment_type_code = treatments.treatment_type_code order by treatments.cost_of_treatment asc limit 1", "gold_parse": "SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1", "question": "Give me the description of the treatment type whose total cost is the lowest.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.treatment_type_description FROM Charges AS T1 JOIN Treatment_Types AS T2 JOIN Treatments AS T3 GROUP BY T3.treatment_type_code ORDER BY Avg ( T1.charge_amount ) Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Charges table, find corresponding rows in Treatment_Types table and in Treatments table', \"Step 2: find the average charge_amount of each value of Treatments's treatment_type_code in the results of step 1\", 'Step 3: find treatment_type_description of the results of step 1 with smallest value in the results of step 2']", "feedback": "the total cost of treatment need to be supplant in place of the id of average professional.", "context": "Give me the description of the treatment type whose total cost is the lowest. || select treatment_types.treatment_type_description from charges join treatment_types join treatments group by treatments.treatment_type_code order by avg ( charges.charge_amount ) asc limit 1 || dog_kennels | treatment_types : treatment_type_description, treatment_type_code | treatments : treatment_type_code, cost_of_treatment || the total cost of treatment need to be supplant in place of the id of average professional.", "label": "dog_kennels | select treatment_types.treatment_type_description from treatment_types join treatments on treatment_types.treatment_type_code = treatments.treatment_type_code group by treatment_types.treatment_type_code order by sum ( cost_of_treatment ) asc limit 1" }, { "prediction": "network_1 | select count ( * ), student_id from likes group by student_id", "gold_parse": "SELECT student_id , count(*) FROM Likes GROUP BY student_id", "question": "How many likes correspond to each student id?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT student_id , Count ( * ) FROM Friend GROUP BY student_id", "predicted_parse_explanation": "['find each value of student_id in Friend table along with the number of the corresponding rows to each value']", "feedback": "Feedback seems incomplete. So, I didn't frame the sentence.", "context": "How many likes correspond to each student id? || select student_id, count ( * ) from friend group by student_id || network_1 | likes : student_id || Feedback seems incomplete. So, I didn't frame the sentence.", "label": "network_1 | select student_id, count ( * ) from likes group by student_id" }, { "prediction": "wta_1 | select first_name, country_code from players order by birth_date asc limit 1", "gold_parse": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1", "question": "Find the first name and country code of the oldest player.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT first_name , country_code FROM players ORDER BY birth_date Desc LIMIT 1", "predicted_parse_explanation": "['find the first_name, country_code of players table with largest value of birth_date']", "feedback": "The smallest is the right word , not largest .", "context": "Find the first name and country code of the oldest player. || select first_name, country_code from players order by birth_date desc limit 1 || wta_1 | players : first_name, country_code, birth_date || The smallest is the right word, not largest.", "label": "wta_1 | select first_name, country_code from players order by birth_date asc limit 1" }, { "prediction": "world_1 | select name, population, lifeexpectancy from country where continent = 'Asia' order by surfacearea desc limit 1", "gold_parse": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1", "question": "Find the name, population and expected life length of asian country with the largest area?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name , Population , Capital FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea Desc LIMIT 1", "predicted_parse_explanation": "['find the Name, Population, Capital of country table for which Continent equals Asia with largest value of SurfaceArea']", "feedback": "Need to change capital with life expectancy .", "context": "Find the name, population and expected life length of asian country with the largest area? || select name, population, capital from country where continent = 'Asia' order by surfacearea desc limit 1 || world_1 | country : name, population, lifeexpectancy, continent ( \"Asia\" ), surfacearea || Need to change capital with life expectancy.", "label": "world_1 | select name, population, lifeexpectancy from country where continent = 'Asia' order by surfacearea desc limit 1" }, { "prediction": "world_1 | select country.region from country join countrylanguage on country.countrycode = countrylanguage.countrycode where countrylanguage.language = 'English' or countrylanguage.language = 'Dutch'", "gold_parse": "SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" OR T2.Language = \"Dutch\"", "question": "What are the regions that use English or Dutch?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Region FROM country WHERE Name = \"Dutch\" OR Name = \"English\"", "predicted_parse_explanation": "['find Region of country table whose Name equals English or Name equals Dutch']", "feedback": "There should be language in place of name .", "context": "What are the regions that use English or Dutch? || select region from country where name = 'Dutch' or name = 'English' || world_1 | country : region, countrycode | countrylanguage : countrycode, language ( \"Dutch\" ) || There should be language in place of name.", "label": "world_1 | select distinct country.region from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' or countrylanguage.language = 'Dutch'" }, { "prediction": "flight_2 | select airlines.abbreviation, country from airlines join flights on airlines.abbreviation = flights.airline group by airlines.abbreviation order by count ( * ) asc limit 1", "gold_parse": "SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1", "question": "What is the abbreviation of the airilne has the fewest flights and what country is it in?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Abbreviation , Country FROM airlines GROUP BY Country ORDER BY Count ( * ) Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Country in airlines table', 'Step 2: find Abbreviation, Country of airlines table with smallest value in the results of step 1']", "feedback": "use airline and flight table instead of country and airline table.", "context": "What is the abbreviation of the airilne has the fewest flights and what country is it in? || select abbreviation, country from airlines group by country order by count ( * ) asc limit 1 || flight_2 | airlines : abbreviation, country | flights : airline || use airline and flight table instead of country and airline table.", "label": "flight_2 | select airlines.abbreviation, airlines.country from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) asc limit 1" }, { "prediction": "student_transcripts_tracking | select addresses.address_id, students.current_address_id from addresses join students on addresses.address_id = students.current_address_id group by addresses.address_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.address_id , T1.line_1 , T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1", "question": "Which address holds the most number of students currently? List the address id and all lines.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT current_address_id , email_address FROM Students GROUP BY permanent_address_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of permanent_address_id in Students table', 'Step 2: find current_address_id, email_address of Students table with largest value in the results of step 1']", "feedback": "I want id of current address from 1st step and id of address, line 1, line 2, line 3 from 2nd step.", "context": "Which address holds the most number of students currently? List the address id and all lines. || select current_address_id, email_address from students group by permanent_address_id order by count ( * ) desc limit 1 || student_transcripts_tracking | addresses : address_id, line_1 | students : current_address_id || I want id of current address from 1st step and id of address, line 1, line 2, line 3 from 2nd step.", "label": "student_transcripts_tracking | select addresses.address_id, addresses.line_1, addresses.line_2 from addresses join students on addresses.address_id = students.current_address_id group by addresses.address_id order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select airportname from airports except select airports.airportname from airports join flights on airports.airportcode = flights.destairport or flights.sourceairport = flights.sourceairport", "gold_parse": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)", "question": "Which airports do not have departing or arriving flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.AirportName FROM airports AS T1 WHERE T1.AirportCode NOT IN ( SELECT T2.DestAirport FROM flights AS T2 )", "predicted_parse_explanation": "['Step 1: find the DestAirport of flights table', 'Step 2: find the AirportName of airports table whose AirportCode not one of the results of step 1']", "feedback": "Also mention \" or source airport in step 1.", "context": "Which airports do not have departing or arriving flights? || select airports.airportname from airports where airports.airportcode not in ( select flights.destairport from flights ) || flight_2 | airports : airportname, airportcode | flights : destairport, sourceairport || Also mention \" or source airport in step 1.", "label": "flight_2 | select airportname from airports where airportcode not in ( select sourceairport from flights union select destairport from flights )" }, { "prediction": "world_1 | select population, name, headofstate from country order by surfacearea desc limit 1", "gold_parse": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", "question": "What are the population, name and leader of the country with the largest area?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT LifeExpectancy , Name , LocalName FROM country ORDER BY SurfaceArea Desc LIMIT 1", "predicted_parse_explanation": "['find the LifeExpectancy, Name, LocalName of country table with largest value of SurfaceArea']", "feedback": "Change life expectancy with population and local name with head of state .", "context": "What are the population, name and leader of the country with the largest area? || select lifeexpectancy, name, localname from country order by surfacearea desc limit 1 || world_1 | country : population, name, headofstate, surfacearea || Change life expectancy with population and local name with head of state.", "label": "world_1 | select name, population, headofstate from country order by surfacearea desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select template_type_code, count ( * ) from templates group by template_type_code", "gold_parse": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code", "question": "Show all template type codes and the number of documents using each type.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_Type_Code , Count ( * ) FROM Templates GROUP BY Template_Type_Code", "predicted_parse_explanation": "['find each value of Template_Type_Code in Templates table along with the number of the corresponding rows to each value']", "feedback": "You need to search all the similar rows for individual value of documents table.", "context": "Show all template type codes and the number of documents using each type. || select template_type_code, count ( * ) from templates group by template_type_code || cre_Doc_Template_Mgt | templates : template_type_code || You need to search all the similar rows for individual value of documents table.", "label": "cre_Doc_Template_Mgt | select templates.template_type_code, count ( * ) from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code" }, { "prediction": "flight_2 | select airports.city from airports join flights on airports.airportcode = flights.sourceairport group by airports.city order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "question": "Which city has most number of arriving flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT City FROM airports GROUP BY City ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of City in airports table', 'Step 2: find City of airports table with largest value in the results of step 1']", "feedback": "i want \" city of \"destairport from table of flights \" in step 1.", "context": "Which city has most number of arriving flights? || select city from airports group by city order by count ( * ) desc limit 1 || flight_2 | airports : city, airportcode | flights : sourceairport || i want \" city of \"destairport from table of flights \" in step 1.", "label": "flight_2 | select airports.city from airports join flights on airports.airportcode = flights.destairport group by airports.city order by count ( * ) desc limit 1" }, { "prediction": "tvshow | select air_date from tv_series where episode = 'A Love of a Lifetime'", "gold_parse": "SELECT Air_Date FROM TV_series WHERE Episode = \"A Love of a Lifetime\"", "question": "What is the air date of TV series with Episode \"A Love of a Lifetime\"?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Air_Date , Episode FROM TV_series WHERE Episode = \"A Love of a Lifetime\"", "predicted_parse_explanation": "['find the Air_Date, Episode of TV_series table for which Episode equals A Love of a Lifetime']", "feedback": "You need to search for the air date.", "context": "What is the air date of TV series with Episode \"A Love of a Lifetime\"? || select air_date, episode from tv_series where episode = 'A Love of a Lifetime' || tvshow | tv_series : air_date, episode ( \"A Love of a Lifetime\" ) || You need to search for the air date.", "label": "tvshow | select air_date from tv_series where episode = 'A Love of a Lifetime'" }, { "prediction": "car_1 | select max ( mpg ) from cars_data where cylinders = 8 or year < 1980", "gold_parse": "SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1", "question": "What is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Max ( T3.Horsepower ) FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T1.Model = \"amc\" OR T3.Year < 1", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find the maximum Horsepower in the results of step 1 whose model_list's Model equals amc or Year less than 1\"]", "feedback": "Change horsepower with mpg , model list's model with cylinders equals 8 and ensure year less than 1980.", "context": "What is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980? || select max ( cars_data.horsepower ) from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where model_list.model = 'amc' or cars_data.year < 1 || car_1 | cars_data : mpg, cylinders ( 8 ), year ( 1980 ) || Change horsepower with mpg, model list's model with cylinders equals 8 and ensure year less than 1980.", "label": "car_1 | select mpg from cars_data where cylinders = 8 or year < 1980 order by mpg desc limit 1" }, { "prediction": "wta_1 | select players.first_name, players.country_code from players join rankings on players.player_id = rankings.player_id group by players.player_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1", "question": "Find the first name and country code of the player who did the most number of tours.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.country_code FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T2.loser_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find the number of rows of each value of loser_id in the results of step 1', 'Step 3: find first_name, country_code of step 1 results with largest value in the results of step 2']", "feedback": "Supplant matches with rankings in step 1 , Only find value of ranking's tours in step 2.", "context": "Find the first name and country code of the player who did the most number of tours. || select players.first_name, players.country_code from players join matches on players.player_id = matches.loser_id group by matches.loser_id order by count ( * ) desc limit 1 || wta_1 | players : first_name, country_code, player_id | rankings : player_id || Supplant matches with rankings in step 1, Only find value of ranking's tours in step 2.", "label": "wta_1 | select players.country_code, players.first_name from players join rankings on players.player_id = rankings.player_id order by rankings.tours desc limit 1" }, { "prediction": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.destairport group by airports.airportcode order by count ( * ) asc limit 1", "gold_parse": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1", "question": "Give the code of the airport with the least flights.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT DestAirport FROM flights GROUP BY DestAirport ORDER BY Count ( * ) Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of DestAirport in flights table', 'Step 2: find DestAirport of flights table with smallest value in the results of step 1']", "feedback": "in step 1 and 2, use airport code instead of destination airport.", "context": "Give the code of the airport with the least flights. || select destairport from flights group by destairport order by count ( * ) asc limit 1 || flight_2 | airports : airportcode | flights : destairport || in step 1 and 2, use airport code instead of destination airport.", "label": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) asc limit 1" }, { "prediction": "world_1 | select name, population from country group by name order by count ( * ) asc limit 3", "gold_parse": "SELECT Name FROM country ORDER BY Population ASC LIMIT 3", "question": "Return the names of the 3 countries with the fewest people.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name , Continent FROM country GROUP BY Continent ORDER BY Count ( * ) Asc LIMIT 3", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Continent in country table', 'Step 2: find Name, Continent of country table ordered ascending by the results of step 1', 'Step 3: only show the first 3 rows of the results']", "feedback": "you need to direct population for all the name of country in step 1 and delete continent in step 2.", "context": "Return the names of the 3 countries with the fewest people. || select name, continent from country group by continent order by count ( * ) asc limit 3 || world_1 | country : name, population || you need to direct population for all the name of country in step 1 and delete continent in step 2.", "label": "world_1 | select name from country order by population asc limit 3" }, { "prediction": "car_1 | select max ( mpg ) from cars_data where cylinders = 8 or year < 1980", "gold_parse": "SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1", "question": "What is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Max ( T3.Horsepower ) FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T1.Model = \"amc\" OR T3.Year < 1", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find the maximum Horsepower in the results of step 1 whose model_list's Model equals amc or Year less than 1\"]", "feedback": "make sure that the year is smaller than 1980 as well as use mpg and cylinders is equivalent to 8.", "context": "What is the maximum mpg of the cars that had 8 cylinders or that were produced before 1980? || select max ( cars_data.horsepower ) from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where model_list.model = 'amc' or cars_data.year < 1 || car_1 | cars_data : mpg, cylinders ( 8 ), year ( 1980 ) || make sure that the year is smaller than 1980 as well as use mpg and cylinders is equivalent to 8.", "label": "car_1 | select mpg from cars_data where cylinders = 8 or year < 1980 order by mpg desc limit 1" }, { "prediction": "tvshow | select title from cartoon where directed_by = 'Ben Jones' or directed_by = 'Brandon Vietti'", "gold_parse": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\"", "question": "List the title of all cartoon directed by \"Ben Jones\" or \"Brandon Vietti\".", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Title FROM Cartoon WHERE Written_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\"", "predicted_parse_explanation": "['find Title of Cartoon table whose Written_by equals Ben Jones or Directed_by equals Brandon Vietti']", "feedback": "Use directed by rather than written by .", "context": "List the title of all cartoon directed by \"Ben Jones\" or \"Brandon Vietti\". || select title from cartoon where written_by = 'Ben Jones' or directed_by = 'Brandon Vietti' || tvshow | cartoon : title, directed_by ( \"Brandon Vietti\" ) || Use directed by rather than written by.", "label": "tvshow | select title from cartoon where directed_by = 'Ben Jones' or directed_by = 'Brandon Vietti'" }, { "prediction": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Asia' group by countrylanguage.language order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1", "question": "Which language is the most popular on the Asian continent?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Code2 FROM country WHERE Continent = \"Asia\" GROUP BY Code2 ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the rows in country table whose Continent equals Asia', 'Step 2: find each value of Code2 in the results of step 1 ordered descending by number of rows that correspond of each value', 'Step 3: only show the first row of the results']", "feedback": "Need to change code 2 with countrylanguage 's language .", "context": "Which language is the most popular on the Asian continent? || select code2 from country where continent = 'Asia' group by code2 order by count ( * ) desc limit 1 || world_1 | countrylanguage : language, countrycode | country : code, continent ( \"Asia\" ) || Need to change code 2 with countrylanguage's language.", "label": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Asia' group by countrylanguage.language order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO' except select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"", "question": "Find all airlines that have flights from airport 'CVO' but not from 'APG'.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.Airline FROM airlines AS T1 WHERE T1.Abbreviation = \"CVO\" EXCEPT SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.AirportName = \"APG\"", "predicted_parse_explanation": "['Step 1: find the Airline of airlines table for which Abbreviation equals CVO', 'Step 2: For each row in airlines table, find the corresponding rows in airports table', 'Step 3: find Airline of the results of step 2 whose AirportName equals APG', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "i want source airport, flights and source airport from step 1, 2 and 3 respectively.", "context": "Find all airlines that have flights from airport 'CVO' but not from 'APG'. || select airlines.airline from airlines where airlines.abbreviation = 'CVO' except select airlines.airline from airlines join airports where airports.airportname = 'APG' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"APG\" ) || i want source airport, flights and source airport from step 1, 2 and 3 respectively.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO' except select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG'" }, { "prediction": "dog_kennels | select dogs.name, treatments.date_of_treatment from dogs join treatments on dogs.breed_code = treatments.dog_id group by dogs.breed_code order by treatments.date_of_treatment desc limit 1", "gold_parse": "SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )", "question": "List the names of the dogs of the rarest breed and the treatment dates of them.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT name , date_of_birth FROM Dogs ORDER BY age Desc LIMIT 1", "predicted_parse_explanation": "['find the name, date_of_birth of Dogs table with largest value of age']", "feedback": "for the lowest breed code, give me the name and date of treatment of dogs.", "context": "List the names of the dogs of the rarest breed and the treatment dates of them. || select name, date_of_birth from dogs order by age desc limit 1 || dog_kennels | dogs : name, breed_code | treatments : date_of_treatment, dog_id || for the lowest breed code, give me the name and date of treatment of dogs.", "label": "dog_kennels | select dogs.name, treatments.date_of_treatment from dogs join treatments on dogs.dog_id = treatments.dog_id where dogs.breed_code = ( select breed_code from dogs group by breed_code order by count ( * ) asc limit 1 )" }, { "prediction": "wta_1 | select players.winner_name from players join matches on players.player_id = matches.winner_id where matches.year = 2013 intersect select players.winner_name from players join matches on players.player_id = matches.winner_id where matches.year = 2016", "gold_parse": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016", "question": "What are the names of players who won in both 2013 and 2016?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT tourney_name FROM matches WHERE year = 2013 INTERSECT SELECT tourney_name FROM matches WHERE year = 2016", "predicted_parse_explanation": "['Step 1: find the tourney_name of matches table for which year equals 2013', 'Step 2: find the tourney_name of matches table for which year equals 2016', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Substitute winner name for both tourney name .", "context": "What are the names of players who won in both 2013 and 2016? || select tourney_name from matches where year = 2013 intersect select tourney_name from matches where year = 2016 || wta_1 | players : winner_name, player_id | matches : winner_id, year ( 2016 ) || Substitute winner name for both tourney name.", "label": "wta_1 | select winner_name from matches where year = 2013 intersect select winner_name from matches where year = 2016" }, { "prediction": "concert_singer | select name, country from singer where song_name like '%Hey%'", "gold_parse": "SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'", "question": "what is the name and nation of the singer who have a song having 'Hey' in its name?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Name , Country FROM singer WHERE Name LIKE \"Hey\"", "predicted_parse_explanation": "['find the Name, Country of singer table for which Name contains Hey']", "feedback": "We will have to use song name contains Hey in place of name contains Hey .", "context": "what is the name and nation of the singer who have a song having 'Hey' in its name? || select name, country from singer where name like 'Hey' || concert_singer | singer : name, country, song_name ( \"%Hey%\" ) || We will have to use song name contains Hey in place of name contains Hey.", "label": "concert_singer | select name, country from singer where song_name like '%Hey%'" }, { "prediction": "dog_kennels | select dogs.date_arrived, dogs.date_departed from treatments join dogs on treatments.dog_id = dogs.dog_id", "gold_parse": "SELECT DISTINCT T1.date_arrived , T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id", "question": "What are the arriving date and the departing date of the dogs who have gone through a treatment?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT date_departed , date_of_birth FROM Dogs WHERE gender = 1", "predicted_parse_explanation": "['find the date_departed, date_of_birth of Dogs table for which gender equals 1']", "feedback": "gender equals 1 to be replaced with treatments table's dog id and date of birth with date arrived .", "context": "What are the arriving date and the departing date of the dogs who have gone through a treatment? || select date_departed, date_of_birth from dogs where gender = 1 || dog_kennels | dogs : date_arrived, date_departed, dog_id | treatments : dog_id || gender equals 1 to be replaced with treatments table's dog id and date of birth with date arrived.", "label": "dog_kennels | select distinct dogs.date_arrived, dogs.date_departed from dogs join treatments on dogs.dog_id = treatments.dog_id" }, { "prediction": "student_transcripts_tracking | select count ( distinct departments.department_id ) from degree_programs join departments on degree_programs.department_id = departments.department_id", "gold_parse": "SELECT count(DISTINCT department_id) FROM Degree_Programs", "question": "How many different departments offer degrees?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT department_name ) FROM Departments", "predicted_parse_explanation": "['find the number of different department_name in Departments table']", "feedback": "I want the departments having department id in degree programs table. ", "context": "How many different departments offer degrees? || select count ( distinct department_name ) from departments || student_transcripts_tracking | departments : department_id | degree_programs : department_id || I want the departments having department id in degree programs table.", "label": "student_transcripts_tracking | select count ( distinct department_id ) from degree_programs" }, { "prediction": "wta_1 | select count ( * ), hand from players group by hand", "gold_parse": "SELECT count(*) , hand FROM players GROUP BY hand", "question": "Find the number of players for each hand type.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.hand , Count ( * ) FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T2.loser_id", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find each value of loser_id in the results of step 1 along with the number of the corresponding rows to each value']", "feedback": "Substitute loser id with hand in step 2.", "context": "Find the number of players for each hand type. || select players.hand, count ( * ) from players join matches on players.player_id = matches.loser_id group by matches.loser_id || wta_1 | players : hand || Substitute loser id with hand in step 2.", "label": "wta_1 | select count ( * ), hand from players group by hand" }, { "prediction": "pets_1 | select count ( * ) from pets join has_pet on pets.pettype = has_pet.petstuid join student on has_pet.stuid = student.stuid where student.sex = 'F'", "gold_parse": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'", "question": "How many dog pets are raised by female students?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Pets WHERE PetType = \"F\" AND pet_age = 3", "predicted_parse_explanation": "['find the number of rows in Pets table whose PetType equals F and pet_age equals 3']", "feedback": "i want the number of rows of has pet table whose pet type is dog and sex is female.", "context": "How many dog pets are raised by female students? || select count ( * ) from pets where pettype = 'F' and pet_age = 3 || pets_1 | pets : pettype ( \"dog\" ) | has_pet : stuid | student : stuid, sex ( \"F\" ) || i want the number of rows of has pet table whose pet type is dog and sex is female.", "label": "pets_1 | select count ( * ) from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where student.sex = 'F' and pets.pettype = 'dog'" }, { "prediction": "pets_1 | select stuid from student except select stuid from has_pet join pets on has_pet.petid = pets.petid where pets.pettype = 'Cat'", "gold_parse": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'", "question": "Find the id of students who do not have a cat pet.", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT T1.StuID FROM Student AS T1 EXCEPT SELECT T2.StuID FROM Has_Pet AS T2", "predicted_parse_explanation": "['Step 1: find the StuID of Student table', 'Step 2: find the StuID of Has_Pet table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "Find student id of has pet whose pet type equals cat in Step 2.", "context": "Find the id of students who do not have a cat pet. || select student.stuid from student except select has_pet.stuid from has_pet as has_pet || pets_1 | student : stuid | has_pet : stuid, petid | pets : petid, pettype ( \"Cat\" ) || Find student id of has pet whose pet type equals cat in Step 2.", "label": "pets_1 | select stuid from student except select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat'" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) < 200", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200", "question": "Find all airlines that have fewer than 200 flights.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines GROUP BY Airline HAVING Count ( * ) > = 200", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Airline in airlines table', 'Step 2: find Airline in airlines table whose corresponding value in step 1 is greater than or equals 200']", "feedback": "Change flights table with airlines table instep 1 , Remove \"greater than or equals\" use \"less than\" instep 2.", "context": "Find all airlines that have fewer than 200 flights. || select airline from airlines group by airline having count ( * ) > = 200 || flight_2 | airlines : airline, uid | flights : airline || Change flights table with airlines table instep 1, Remove \"greater than or equals\" use \"less than\" instep 2.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) < 200" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.grade = friend.student_id where highschooler.grade > 5 intersect select highschooler.name from highschooler join friend on highschooler.grade = friend.student_id where friend.grade >= 2", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2", "question": "What are the names of high schoolers who have a grade of over 5 and have 2 or more friends?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler WHERE grade > 2 INTERSECT SELECT name FROM Highschooler WHERE grade < 5", "predicted_parse_explanation": "['Step 1: find the name of Highschooler table for which grade greater than 2', 'Step 2: find the name of Highschooler table for which grade less than 5', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Exchange \" 2\" with \" 5\" , grade with Friend's student id greater than or equals 2 in step 2.", "context": "What are the names of high schoolers who have a grade of over 5 and have 2 or more friends? || select name from highschooler where grade > 2 intersect select name from highschooler where grade < 5 || network_1 | highschooler : name, grade ( 5 ) | friend : student_id || Exchange \" 2\" with \" 5\", grade with Friend's student id greater than or equals 2 in step 2.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id where highschooler.grade > 5 group by friend.student_id having count ( * ) >= 2" }, { "prediction": "flight_2 | select count ( * ) from flights", "gold_parse": "SELECT count(*) FROM FLIGHTS", "question": "How many flights do we have?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines", "predicted_parse_explanation": "['find the number of rows in airlines table']", "feedback": "flights table should be use in place of airlines table .", "context": "How many flights do we have? || select count ( * ) from airlines || flight_2 | flights : || flights table should be use in place of airlines table.", "label": "flight_2 | select count ( * ) from flights" }, { "prediction": "tvshow | select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.id where cartoon.directed_by = 'Ben Jones' intersect select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.id where cartoon.directed_by = 'Michael Chang'", "gold_parse": "SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'", "question": "What is the series name and country of all TV channels that are playing cartoons directed by Ben Jones and cartoons directed by Michael Chang?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.series_name , T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Ben Jones\" AND T2.Directed_by = \"Michael Chang\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find series_name, Country of the results of step 1 whose Written_by equals Ben Jones and Directed_by equals Michael Chang']", "feedback": "Use directed by instead of written by .", "context": "What is the series name and country of all TV channels that are playing cartoons directed by Ben Jones and cartoons directed by Michael Chang? || select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Ben Jones' and cartoon.directed_by = 'Michael Chang' || tvshow | tv_channel : series_name, country, id | cartoon : id, directed_by ( \"Michael Chang\" ) || Use directed by instead of written by.", "label": "tvshow | select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Michael Chang' intersect select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Ben Jones'" }, { "prediction": "world_1 | select distinct city.name from country join country on city.countrycode = country.code join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'Chinese' and country.continent = 'Asia'", "gold_parse": "SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode JOIN city AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = \"Asia\"", "question": "Whic`h unique cities are in Asian countries where Chinese is the official language?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.District FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = \"T\" AND T2.LocalName = \"Chinese\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in city table', 'Step 2: find District of the results of step 1 whose Continent equals T and LocalName equals Chinese']", "feedback": "In step 2 swap district , continent and local name with city , is official and language respectively , ensure continent is Asia .", "context": "Which unique cities are in Asian countries where Chinese is the official language? || select city.district from city join country on city.countrycode = country.code where country.continent = 'T' and country.localname = 'Chinese' || world_1 | city : name, countrycode | country : code, continent ( \"Asia\" ) | countrylanguage : countrycode, language ( \"Chinese\" ) || In step 2 swap district, continent and local name with city, is official and language respectively, ensure continent is Asia.", "label": "world_1 | select distinct city.name from country join countrylanguage on country.code = countrylanguage.countrycode join city on country.code = city.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'Chinese' and country.continent = 'Asia'" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id having count ( * ) >= 3", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3", "question": "What are the names of high schoolers who have 3 or more friends?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler GROUP BY grade , grade HAVING Count ( * ) > = 3", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of grade, grade in Highschooler table', 'Step 2: find name in Highschooler table whose corresponding value in step 1 is greater than or equals 3']", "feedback": "In step 1, you need student id in friend table and grade in high schooler table.", "context": "What are the names of high schoolers who have 3 or more friends? || select name from highschooler group by grade, grade having count ( * ) > = 3 || network_1 | highschooler : name, id | friend : student_id || In step 1, you need student id in friend table and grade in high schooler table.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id having count ( * ) >= 3" }, { "prediction": "flight_2 | select count ( * ) from airports join flights on airports.airportcode = flights.sourceairport where airports.airportcode = 'ATO'", "gold_parse": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"", "question": "How many flights have destination ATO?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE Country = \"ATO\"", "predicted_parse_explanation": "['find the number of rows in airports table whose Country equals ATO']", "feedback": "you need to interchange airports table which has country to flights table which has destairport.", "context": "How many flights have destination ATO? || select count ( * ) from airports where country = 'ATO' || flight_2 | airports : airportcode ( \"ATO\" ) | flights : sourceairport || you need to interchange airports table which has country to flights table which has destairport.", "label": "flight_2 | select count ( * ) from flights where destairport = 'ATO'" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO' except select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"", "question": "Find all airlines that have flights from airport 'CVO' but not from 'APG'.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.Airline FROM airlines AS T1 WHERE T1.Abbreviation = \"CVO\" EXCEPT SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.AirportName = \"APG\"", "predicted_parse_explanation": "['Step 1: find the Airline of airlines table for which Abbreviation equals CVO', 'Step 2: For each row in airlines table, find the corresponding rows in airports table', 'Step 3: find Airline of the results of step 2 whose AirportName equals APG', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "In step 1 replace abbreviation with source airport , in step 2 airports with flights , in step 3 airport name with source airport .", "context": "Find all airlines that have flights from airport 'CVO' but not from 'APG'. || select airlines.airline from airlines where airlines.abbreviation = 'CVO' except select airlines.airline from airlines join airports where airports.airportname = 'APG' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"APG\" ) || In step 1 replace abbreviation with source airport, in step 2 airports with flights, in step 3 airport name with source airport.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO' except select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG'" }, { "prediction": "wta_1 | select winner_name, winner_rank from matches order by winner_id desc limit 1", "gold_parse": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", "question": "Find the name and rank points of the winner who won the most times.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT tourney_name , loser_rank FROM matches GROUP BY winner_entry ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of winner_entry in matches table', 'Step 2: find tourney_name, loser_rank of matches table with largest value in the results of step 1']", "feedback": "You should use winner's name and winner's rank instead of tourney's name and loser's rank respectively.", "context": "Find the name and rank points of the winner who won the most times. || select tourney_name, loser_rank from matches group by winner_entry order by count ( * ) desc limit 1 || wta_1 | matches : winner_name, winner_rank, winner_id || You should use winner's name and winner's rank instead of tourney's name and loser's rank respectively.", "label": "wta_1 | select winner_name, winner_rank_points from matches group by winner_name order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.indepyear < 1930", "gold_parse": "SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = \"T\"", "question": "What is the total number of unique official languages spoken in the countries that are founded before 1930?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Code2 ) FROM country WHERE IndepYear < 1930", "predicted_parse_explanation": "['find the number of different Code2 in country table whose IndepYear less than 1930']", "feedback": "Replace code 2 in country with language in countrylanguage and Ensure corresponding is official equals T .", "context": "What is the total number of unique official languages spoken in the countries that are founded before 1930? || select count ( distinct code2 ) from country where indepyear < 1930 || world_1 | countrylanguage : language, countrycode | country : code, indepyear ( 1930 ) || Replace code 2 in country with language in countrylanguage and Ensure corresponding is official equals T.", "label": "world_1 | select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where indepyear < 1930 and countrylanguage.isofficial = 'T'" }, { "prediction": "flight_2 | select flightno from flights where sourceairport = 'APG'", "gold_parse": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"", "question": "What are flight numbers of flights departing from Airport \"APG\"?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T2.FlightNo FROM airports AS T1 JOIN flights AS T2 ON T1.AirportCode = T2.SourceAirport WHERE T1.AirportName = \"APG\"", "predicted_parse_explanation": "['Step 1: For each row in airports table, find the corresponding rows in flights table', 'Step 2: find FlightNo of the results of step 1 whose AirportName equals APG']", "feedback": "source airport must be apg.", "context": "What are flight numbers of flights departing from Airport \"APG\"? || select flights.flightno from airports join flights on airports.airportcode = flights.sourceairport where airports.airportname = 'APG' || flight_2 | flights : flightno, sourceairport ( \"APG\" ) || source airport must be apg.", "label": "flight_2 | select flightno from flights where sourceairport = 'APG'" }, { "prediction": "world_1 | select sum ( surfacearea ) from country where continent = 'Asia' and continent = 'Europe'", "gold_parse": "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", "question": "What is the total surface area of the continents Asia and Europe?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Sum ( SurfaceArea ) FROM country WHERE Continent = \"Europe\" AND Continent = \"Asia\"", "predicted_parse_explanation": "['find the summation of SurfaceArea in country table whose Continent equals Asia and Continent equals Europe']", "feedback": "Incomplete feedback, so cannot form the sentence.", "context": "What is the total surface area of the continents Asia and Europe? || select sum ( surfacearea ) from country where continent = 'Europe' and continent = 'Asia' || world_1 | country : surfacearea, continent ( \"Europe\" ) || Incomplete feedback, so cannot form the sentence.", "label": "world_1 | select sum ( surfacearea ) from country where continent = 'Asia' or continent = 'Europe'" }, { "prediction": "student_transcripts_tracking | select count ( distinct departments.department_id ) from degrees join departments on degree_programs.department_id = departments.department_id", "gold_parse": "SELECT count(DISTINCT department_id) FROM Degree_Programs", "question": "How many different departments offer degrees?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT department_name ) FROM Departments", "predicted_parse_explanation": "['find the number of different department_name in Departments table']", "feedback": "Find for departments whose department id is present in degree programs table .", "context": "How many different departments offer degrees? || select count ( distinct department_name ) from departments || student_transcripts_tracking | departments : department_id | degree_programs : department_id || Find for departments whose department id is present in degree programs table.", "label": "student_transcripts_tracking | select count ( distinct department_id ) from degree_programs" }, { "prediction": "car_1 | select count ( * ) from countries", "gold_parse": "SELECT count(*) FROM COUNTRIES", "question": "How many countries exist?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM continents", "predicted_parse_explanation": "['find the number of rows in continents table']", "feedback": "Supersede continents with countries .", "context": "How many countries exist? || select count ( * ) from continents || car_1 | countries : || Supersede continents with countries.", "label": "car_1 | select count ( * ) from countries" }, { "prediction": "wta_1 | select players.first_name, players.country_code, players.birth_date from players join matches on players.player_id = matches.winner_rank group by players.player_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1", "question": "Find the first name, country code and birth date of the winner who has the highest rank points in all matches.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.country_code , T2.loser_age FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id ORDER BY T2.winner_rank Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find first_name, country_code, loser_age of the results of step 1 with largest value of winner_rank']", "feedback": "Use birth date instead of loser age and winner rank points instead of winner rank .", "context": "Find the first name, country code and birth date of the winner who has the highest rank points in all matches. || select players.first_name, players.country_code, matches.loser_age from players join matches on players.player_id = matches.loser_id order by matches.winner_rank desc limit 1 || wta_1 | players : first_name, country_code, birth_date, player_id | matches : winner_rank || Use birth date instead of loser age and winner rank points instead of winner rank.", "label": "wta_1 | select players.first_name, players.country_code, players.birth_date from players join matches on players.player_id = matches.winner_id order by matches.winner_rank_points desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select templates.template_type_code from documents join templates on documents.template_id = templates.template_id group by templates.template_type_code order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1", "question": "Which template type code is used by most number of documents?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_Type_Code FROM Templates GROUP BY Template_Type_Code ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Template_Type_Code in Templates table', 'Step 2: find Template_Type_Code of Templates table with largest value in the results of step 1']", "feedback": "Change templates table with documents in step 1.", "context": "Which template type code is used by most number of documents? || select template_type_code from templates group by template_type_code order by count ( * ) desc limit 1 || cre_Doc_Template_Mgt | templates : template_type_code | documents : template_id || Change templates table with documents in step 1.", "label": "cre_Doc_Template_Mgt | select templates.template_type_code from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code order by count ( * ) desc limit 1" }, { "prediction": "car_1 | select avg ( horsepower ) from cars_data where year < 1980", "gold_parse": "SELECT avg(horsepower) FROM CARS_DATA WHERE YEAR < 1980", "question": "What is the average horsepower for all cards produced before 1980?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Avg ( T1.Maker ) FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T3.Year < 1980", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', 'Step 2: find the average Maker in the results of step 1 whose Year less than 1980']", "feedback": "Exchange maker with horsepower in step 2.", "context": "What is the average horsepower for all cards produced before 1980? || select avg ( model_list.maker ) from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.year < 1980 || car_1 | cars_data : horsepower, year ( 1980 ) || Exchange maker with horsepower in step 2.", "label": "car_1 | select avg ( horsepower ) from cars_data where year < 1980" }, { "prediction": "dog_kennels | select dogs.name, treatments.date_of_treatment from dogs join treatments on dogs.breed_code = treatments.dog_id group by dogs.breed_code order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )", "question": "List the names of the dogs of the rarest breed and the treatment dates of them.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT name , date_of_birth FROM Dogs ORDER BY age Desc LIMIT 1", "predicted_parse_explanation": "['find the name, date_of_birth of Dogs table with largest value of age']", "feedback": "Need to find name , Treatments's date of treatment of dogs table for smallest count of breed code .", "context": "List the names of the dogs of the rarest breed and the treatment dates of them. || select name, date_of_birth from dogs order by age desc limit 1 || dog_kennels | dogs : name, breed_code | treatments : date_of_treatment, dog_id || Need to find name, Treatments's date of treatment of dogs table for smallest count of breed code.", "label": "dog_kennels | select dogs.name, treatments.date_of_treatment from dogs join treatments on dogs.dog_id = treatments.dog_id where dogs.breed_code = ( select breed_code from dogs group by breed_code order by count ( * ) asc limit 1 )" }, { "prediction": "world_1 | select country.region from country join countrylanguage on country.countrycode = countrylanguage.countrycode where countrylanguage.language = 'Dutch' or countrylanguage.language = 'english'", "gold_parse": "SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" OR T2.Language = \"Dutch\"", "question": "Which regions speak Dutch or English?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE Continent = \"English\" OR LocalName = \"Dutch\"", "predicted_parse_explanation": "['find Continent of country table whose Continent equals English or LocalName equals Dutch']", "feedback": "in both the language you need to use region and local name.", "context": "Which regions speak Dutch or English? || select continent from country where continent = 'English' or localname = 'Dutch' || world_1 | country : region, countrycode | countrylanguage : countrycode, language ( \"english\" ) || in both the language you need to use region and local name.", "label": "world_1 | select distinct country.region from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' or countrylanguage.language = 'Dutch'" }, { "prediction": "real_estate_properties | select ref_property_types.property_type_description from ref_property_types join properties on ref_property_types.property_type_code = properties.property_type_code", "gold_parse": "SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code", "question": "Show the property type descriptions of properties belonging to that code.", "db_id": "real_estate_properties", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Feature_Types", "Ref_Property_Types", "Other_Available_Features", "Properties", "Other_Property_Features" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4 ], "column_name": [ "*", "feature_type_code", "feature_type_name", "property_type_code", "property_type_description", "feature_id", "feature_type_code", "feature_name", "feature_description", "property_id", "property_type_code", "date_on_market", "date_sold", "property_name", "property_address", "room_count", "vendor_requested_price", "buyer_offered_price", "agreed_selling_price", "apt_feature_1", "apt_feature_2", "apt_feature_3", "fld_feature_1", "fld_feature_2", "fld_feature_3", "hse_feature_1", "hse_feature_2", "hse_feature_3", "oth_feature_1", "oth_feature_2", "oth_feature_3", "shp_feature_1", "shp_feature_2", "shp_feature_3", "other_property_details", "property_id", "feature_id", "property_feature_description" ] }, "db_foreign_keys": { "column_id": [ 6, 10, 35, 36 ], "other_column_id": [ 1, 3, 9, 5 ] }, "predicted_parse_with_values": "SELECT property_type_description FROM Ref_Property_Types", "predicted_parse_explanation": "['find the property_type_description of Ref_Property_Types table']", "feedback": "You need to mention code of property type.", "context": "Show the property type descriptions of properties belonging to that code. || select property_type_description from ref_property_types || real_estate_properties | ref_property_types : property_type_description, property_type_code | properties : property_type_code || You need to mention code of property type.", "label": "real_estate_properties | select ref_property_types.property_type_description from properties join ref_property_types on properties.property_type_code = ref_property_types.property_type_code group by properties.property_type_code" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.grade = friend.student_id group by friend.student_id having count ( * ) >= 2", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2", "question": "Show the names of students who have a grade higher than 5 and have at least 2 friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler WHERE grade > 2 INTERSECT SELECT name FROM Highschooler WHERE grade < 5", "predicted_parse_explanation": "['Step 1: find the name of Highschooler table for which grade greater than 2', 'Step 2: find the name of Highschooler table for which grade less than 5', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Find Highschooler's name which student id equals or greater than 2 and grade greater than 5.", "context": "Show the names of students who have a grade higher than 5 and have at least 2 friends. || select name from highschooler where grade > 2 intersect select name from highschooler where grade < 5 || network_1 | highschooler : name, grade ( 5 ) | friend : student_id || Find Highschooler's name which student id equals or greater than 2 and grade greater than 5.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id where highschooler.grade > 5 group by friend.student_id having count ( * ) >= 2" }, { "prediction": "flight_2 | select count ( * ) from airports join flights on airports.city = flights.sourceairport and flights.airport = flights.airport where airports.city = 'Aberdeen' and airports.airportname = 'Ashley'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"", "question": "How many flights fly from Aberdeen to Ashley?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines WHERE Airline = \"Aberdeen\" AND Airline = \"Ashley\"", "predicted_parse_explanation": "['find the number of rows in airlines table whose Airline equals Ashley and Airline equals Aberdeen']", "feedback": "Exchange airlines with flights table and 1st airline with destination airport and 2nd airline with source airport .", "context": "How many flights fly from Aberdeen to Ashley? || select count ( * ) from airlines where airline = 'Aberdeen' and airline = 'Ashley' || flight_2 | airports : city ( \"Aberdeen\" ), airportname ( \"Ashley\" ) | flights : sourceairport, airline || Exchange airlines with flights table and 1st airline with destination airport and 2nd airline with source airport.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airports on flights.sourceairport = airports.airportcode where airports.city = 'Ashley' and airports.city = 'Aberdeen'" }, { "prediction": "car_1 | select countries.continence, count ( * ) from countries join car_makers on countries.continence = car_makers.continent group by continent", "gold_parse": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent", "question": "How many car makers are there in each continents? List the continent name and the count.", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Continent , Count ( * ) FROM continents GROUP BY Continent", "predicted_parse_explanation": "['find each value of Continent in continents table along with the number of the corresponding rows to each value']", "feedback": "It should be number of the corresponding rows for each continent in car makers .", "context": "How many car makers are there in each continents? List the continent name and the count. || select continent, count ( * ) from continents group by continent || car_1 | countries : continent, contid | car_makers : continent || It should be number of the corresponding rows for each continent in car makers.", "label": "car_1 | select continents.continent, count ( * ) from continents join countries on continents.contid = countries.continent join car_makers on countries.countryid = car_makers.country group by continents.continent" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT'", "gold_parse": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'", "question": "How many documents are using the template with type code 'PPT'?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Templates WHERE Template_Type_Code = \"PPT\"", "predicted_parse_explanation": "['find the number of rows in Templates table whose Template_Type_Code equals PPT']", "feedback": "I want table of documents.", "context": "How many documents are using the template with type code 'PPT'? || select count ( * ) from templates where template_type_code = 'PPT' || cre_Doc_Template_Mgt | documents : template_id | templates : template_id, template_type_code ( \"PPT\" ) || I want table of documents.", "label": "cre_Doc_Template_Mgt | select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT'" }, { "prediction": "student_transcripts_tracking | select first_name from students where permanent_address_id = ( select permanent_address_id from students group by permanent_address_id having count ( * ) distinct from students )", "gold_parse": "SELECT first_name FROM Students WHERE current_address_id != permanent_address_id", "question": "What is the first name of the student whose permanent address is different from his or her current one?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT first_name FROM Students UNION SELECT first_name FROM Students", "predicted_parse_explanation": "['Step 1: find the first_name of Students table', 'Step 2: find the first_name of Students table', 'Step 3: show the rows that are in any of the results of step 1 or the results of step 2']", "feedback": "You need to search the first name from student table and also make sure that permanent address Id does not contains ID of current address.", "context": "What is the first name of the student whose permanent address is different from his or her current one? || select first_name from students union select first_name from students || student_transcripts_tracking | students : first_name, permanent_address_id || You need to search the first name from student table and also make sure that permanent address Id does not contains ID of current address.", "label": "student_transcripts_tracking | select first_name from students where current_address_id!= permanent_address_id" }, { "prediction": "wta_1 | select ranking_date, count ( * ) from rankings group by ranking_date", "gold_parse": "SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date", "question": "How many total tours were there for each ranking date?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , winner_rank FROM matches GROUP BY winner_rank", "predicted_parse_explanation": "['find each value of winner_rank in matches table along with the number of the corresponding rows to each value']", "feedback": "I need date of ranking in rankings table.", "context": "How many total tours were there for each ranking date? || select count ( * ), winner_rank from matches group by winner_rank || wta_1 | rankings : ranking_date, tours || I need date of ranking in rankings table.", "label": "wta_1 | select sum ( tours ), ranking_date from rankings group by ranking_date" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.student_id join highschooler on friend.friend_id = highschooler.id where highschooler.name = 'Kyle'", "gold_parse": "SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = \"Kyle\"", "question": "Show the names of all of the high schooler Kyle's friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler WHERE grade = \"Kyle\"", "predicted_parse_explanation": "['find the name of Highschooler table for which grade equals Kyle']", "feedback": "search Names of high schooler who are friend of Kyle whose id present in friend table .", "context": "Show the names of all of the high schooler Kyle's friends. || select name from highschooler where grade = 'Kyle' || network_1 | highschooler : name, id | friend : student_id, friend_id | highschooler : id, name ( \"Kyle\" ) || search Names of high schooler who are friend of Kyle whose id present in friend table.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id join highschooler on friend.friend_id = highschooler.id where highschooler.name = 'Kyle'" }, { "prediction": "world_1 | select count ( * ) from countrylanguage where language = 'Spanish'", "gold_parse": "SELECT count(*) , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "question": "Count the number of countries for which Spanish is the predominantly spoken language.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM country WHERE LocalName = \"Spanish\"", "predicted_parse_explanation": "['find the number of rows in country table whose LocalName equals Spanish']", "feedback": "Use language instead of local name .", "context": "Count the number of countries for which Spanish is the predominantly spoken language. || select count ( * ) from country where localname = 'Spanish' || world_1 | countrylanguage : percentage, language ( \"Spanish\" ) || Use language instead of local name.", "label": "world_1 | select count ( * ), max ( percentage ) from countrylanguage where language = 'Spanish' group by countrycode" }, { "prediction": "car_1 | select cylinders from cars_data where model = 'Volvo' order by accelerate asc limit 1", "gold_parse": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1", "question": "For model volvo, how many cylinders does the car with the least accelerate have?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Cylinders FROM cars_data ORDER BY Accelerate Asc LIMIT 1", "predicted_parse_explanation": "['find the Cylinders of cars_data table with smallest value of Accelerate']", "feedback": "Make sure that car model name is volvo.", "context": "For model volvo, how many cylinders does the car with the least accelerate have? || select cylinders from cars_data order by accelerate asc limit 1 || car_1 | cars_data : cylinders, model ( \"Volvo\" ), accelerate || Make sure that car model name is volvo.", "label": "car_1 | select cars_data.cylinders from cars_data join car_names on cars_data.id = car_names.makeid where car_names.model = 'volvo' order by cars_data.accelerate asc limit 1" }, { "prediction": "wta_1 | select ranking_date, count ( * ) from rankings group by ranking_date", "gold_parse": "SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date", "question": "How many total tours were there for each ranking date?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , winner_rank FROM matches GROUP BY winner_rank", "predicted_parse_explanation": "['find each value of winner_rank in matches table along with the number of the corresponding rows to each value']", "feedback": "Swap winner rank in matches table with ranking date in rankings .", "context": "How many total tours were there for each ranking date? || select count ( * ), winner_rank from matches group by winner_rank || wta_1 | rankings : ranking_date, tours || Swap winner rank in matches table with ranking date in rankings.", "label": "wta_1 | select sum ( tours ), ranking_date from rankings group by ranking_date" }, { "prediction": "tvshow | select id from tv_channel except select channel from cartoon where directed_by = 'Ben Jones'", "gold_parse": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'", "question": "What are the ids of the TV channels that do not have any cartoons directed by Ben Jones?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Content FROM TV_Channel AS T1 EXCEPT SELECT T1.Content FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: find the Content of TV_Channel table', 'Step 2: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 3: find Content of the results of step 2 whose Written_by equals Ben Jones', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "You should use directed by and id instead of written by and content respectively.", "context": "What are the ids of the TV channels that do not have any cartoons directed by Ben Jones? || select tv_channel.content from tv_channel except select tv_channel.content from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Ben Jones' || tvshow | tv_channel : id | cartoon : channel, directed_by ( \"Ben Jones\" ) || You should use directed by and id instead of written by and content respectively.", "label": "tvshow | select id from tv_channel except select channel from cartoon where directed_by = 'Ben Jones'" }, { "prediction": "world_1 | select sum ( population ), gnp from country where continent = 'Asia'", "gold_parse": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"", "question": "How many people live in Asia, and what is the largest GNP among them?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Max ( Population ) , Min ( GNP ) FROM country", "predicted_parse_explanation": "['find the maximum Population and the minimum GNP in country table']", "feedback": "Find summation of population and maximum gnp in country table whose continent equals Asia .", "context": "How many people live in Asia, and what is the largest GNP among them? || select max ( population ), min ( gnp ) from country || world_1 | country : population, gnp, continent ( \"Asia\" ) || Find summation of population and maximum gnp in country table whose continent equals Asia.", "label": "world_1 | select sum ( population ), max ( gnp ) from country where continent = 'Asia'" }, { "prediction": "cre_Doc_Template_Mgt | select template_type_code from templates except select templates.template_type_code from documents join templates on documents.template_id = templates.template_id", "gold_parse": "SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", "question": "Show all template type codes that are not used by any document.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_Type_Code FROM Templates EXCEPT SELECT Template_Type_Code FROM Templates", "predicted_parse_explanation": "['Step 1: find the Template_Type_Code of Templates table', 'Step 2: find the Template_Type_Code of Templates table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "steps 1 and 2 change template type code with template id , In step 3 find corresponding template type code of the result .", "context": "Show all template type codes that are not used by any document. || select template_type_code from templates except select template_type_code from templates || cre_Doc_Template_Mgt | templates : template_type_code | documents : template_id || steps 1 and 2 change template type code with template id, In step 3 find corresponding template type code of the result.", "label": "cre_Doc_Template_Mgt | select template_type_code from templates except select template_type_code from templates join documents on templates.template_id = documents.template_id" }, { "prediction": "flight_2 | select count ( * ) from airlines join flights on airlines.uid = flights.airline join airports on flights.sourceairport = airports.airportcode where airports.airportname = 'ASY' and airlines.airline = 'United Airlines'", "gold_parse": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"", "question": "Count the number of United Airlines flights arriving in ASY Airport.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"United Airlines\" AND T1.Airline = \"ASY\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in airports table', \"Step 2: find the number of rows in the results of step 1 whose airports's Country equals United Airlines and Airline equals ASY\"]", "feedback": "you have to use airlines of airline table and destination airport instead of country of airports table and airports name respectively.also use flights table in step 1.", "context": "Count the number of United Airlines flights arriving in ASY Airport. || select count ( * ) from airlines join airports where airports.country = 'United Airlines' and airlines.airline = 'ASY' || flight_2 | airlines : uid, airline ( \"United Airlines\" ) | flights : airline, sourceairport | airports : airportcode, airportname ( \"ASY\" ) || you have to use airlines of airline table and destination airport instead of country of airports table and airports name respectively.also use flights table in step 1.", "label": "flight_2 | select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.destairport = 'ASY'" }, { "prediction": "tvshow | select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.id where cartoon.written_by = 'Todd Casey'", "gold_parse": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "question": "What are the countries that have cartoons on TV that were written by Todd Casey?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Todd Casey\" AND T2.Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find Country of the results of step 1 whose Written_by equals Todd Casey and Directed_by equals Ben Jones']", "feedback": "You need to drop And directed by equals Ben Jones.", "context": "What are the countries that have cartoons on TV that were written by Todd Casey? || select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey' and cartoon.directed_by = 'Ben Jones' || tvshow | tv_channel : country, id | cartoon : id, written_by ( \"Todd Casey\" ) || You need to drop And directed by equals Ben Jones.", "label": "tvshow | select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" }, { "prediction": "orchestra | select conductor.name, orchestra.orchestral from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id", "gold_parse": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", "question": "Show the names of conductors and the orchestras they have conducted.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT T1.Name , T2.Year_of_Founded FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", "predicted_parse_explanation": "['Step 1: For each row in conductor table, find the corresponding rows in orchestra table', 'Step 2: find Name, Year_of_Founded of the results of step 1']", "feedback": "The year of founded is wrong , orchestra should be there .", "context": "Show the names of conductors and the orchestras they have conducted. || select conductor.name, orchestra.year_of_founded from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id || orchestra | conductor : name, conductor_id | orchestra : orchestra, conductor_id || The year of founded is wrong, orchestra should be there.", "label": "orchestra | select conductor.name, orchestra.orchestra from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id" }, { "prediction": "dog_kennels | select owners.owner_id, owners.zip_code from owners join dogs on owners.owner_id = dogs.owner_id order by dogs.cost_of_treatment desc limit 1", "gold_parse": "SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1", "question": "Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.owner_id , T2.zip_code FROM Charges AS T1 JOIN Owners AS T2 GROUP BY T2.owner_id ORDER BY Sum ( T1.charge_amount ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Charges table, find the corresponding rows in Owners table', 'Step 2: find the summation of charge_amount of each value of owner_id in the results of step 1', 'Step 3: find owner_id, zip_code of step 1 results with largest value in the results of step 2']", "feedback": "In step 2 Find summation of charge amount with cost of treatment from treatments table too .", "context": "Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code. || select owners.owner_id, owners.zip_code from charges join owners group by owners.owner_id order by sum ( charges.charge_amount ) desc limit 1 || dog_kennels | owners : owner_id, zip_code | dogs : owner_id, cost_of_treatment || In step 2 Find summation of charge amount with cost of treatment from treatments table too.", "label": "dog_kennels | select owners.owner_id, owners.zip_code from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id group by owners.owner_id order by sum ( treatments.cost_of_treatment ) desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select document_name, template_id from documents where document_description like '%w%'", "gold_parse": "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"", "question": "Return the names and template ids for documents that contain the letter w in their description.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_Name , Document_ID FROM Documents WHERE Document_Description LIKE \"w\"", "predicted_parse_explanation": "['find the Document_Name, Document_ID of Documents table for which Document_Description contains w']", "feedback": "document id is wrong . Put template id in place of it .", "context": "Return the names and template ids for documents that contain the letter w in their description. || select document_name, document_id from documents where document_description like 'w' || cre_Doc_Template_Mgt | documents : document_name, template_id, document_description ( \"%w%\" ) || document id is wrong. Put template id in place of it.", "label": "cre_Doc_Template_Mgt | select document_name, template_id from documents where document_description like '%w%'" }, { "prediction": "world_1 | select avg ( gnp ), sum ( population ) from country where governmentform = 'US Territory'", "gold_parse": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"", "question": "Give the mean GNP and total population of nations which are considered US territory.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Sum ( GNP ) , Sum ( Population ) FROM country WHERE Continent = \"US Territory\"", "predicted_parse_explanation": "['find the summation of GNP and the summation of Population in country table whose Continent equals US Territory']", "feedback": "Instead of \"summation of GNP\" , Use \"Average of GNP\".", "context": "Give the mean GNP and total population of nations which are considered US territory. || select sum ( gnp ), sum ( population ) from country where continent = 'US Territory' || world_1 | country : gnp, population, governmentform ( \"US Territory\" ) || Instead of \"summation of GNP\", Use \"Average of GNP\".", "label": "world_1 | select avg ( gnp ), sum ( population ) from country where governmentform = 'US Territory'" }, { "prediction": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.airportcode group by airports.airportcode order by count ( * ) asc limit 1", "gold_parse": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1", "question": "What is the code of airport that has fewest number of flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT DestAirport FROM flights GROUP BY DestAirport ORDER BY Count ( * ) Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of DestAirport in flights table', 'Step 2: find DestAirport of flights table with smallest value in the results of step 1']", "feedback": "In step 1 Change destination airport with source airport and In step 2 destination airport , flights table with airport code , airports table .", "context": "What is the code of airport that has fewest number of flights? || select destairport from flights group by destairport order by count ( * ) asc limit 1 || flight_2 | airports : airportcode | flights : airport code || In step 1 Change destination airport with source airport and In step 2 destination airport, flights table with airport code, airports table.", "label": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) asc limit 1" }, { "prediction": "student_transcripts_tracking | select degree_program_id from student_enrolment group by degree_program_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1", "question": "Find the kind of program which most number of students are enrolled in?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name FROM Courses GROUP BY course_name ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of course_name in Courses table', 'Step 2: find course_name of Courses table with largest value in the results of step 1']", "feedback": "Look for the degree summary name which have program id maximum number of time in student enrolment table.", "context": "Find the kind of program which most number of students are enrolled in? || select course_name from courses group by course_name order by count ( * ) desc limit 1 || student_transcripts_tracking | student_enrolment : degree_program_id || Look for the degree summary name which have program id maximum number of time in student enrolment table.", "label": "student_transcripts_tracking | select degree_programs.degree_summary_name from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id group by degree_programs.degree_summary_name order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"", "question": "What are airlines that have some flight departing from airport 'AHD'?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.AirportName = \"AHD\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in airports table', 'Step 2: find Airline of the results of step 1 whose AirportName equals AHD']", "feedback": "in step 1, you need to use table of flights and in step 2 you need to use source airport.", "context": "What are airlines that have some flight departing from airport 'AHD'? || select airlines.airline from airlines join airports where airports.airportname = 'AHD' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"AHD\" ) || in step 1, you need to use table of flights and in step 2 you need to use source airport.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'" }, { "prediction": "network_1 | select count ( * ), student_id from likes group by student_id", "gold_parse": "SELECT student_id , count(*) FROM Likes GROUP BY student_id", "question": "Count the number of likes for each student id.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , student_id FROM Friend GROUP BY student_id", "predicted_parse_explanation": "['find each value of student_id in Friend table along with the number of the corresponding rows to each value']", "feedback": "It should be likes table , not friend table .", "context": "Count the number of likes for each student id. || select count ( * ), student_id from friend group by student_id || network_1 | likes : student_id || It should be likes table, not friend table.", "label": "network_1 | select student_id, count ( * ) from likes group by student_id" }, { "prediction": "student_transcripts_tracking | select other_student_details from students order by other_student_details desc", "gold_parse": "SELECT other_student_details FROM Students ORDER BY other_student_details DESC", "question": "What other details can you tell me about students in reverse alphabetical order?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT other_details FROM Student_Enrolment ORDER BY other_details Desc", "predicted_parse_explanation": "['find the other_details of Student_Enrolment table ordered descending by other_details']", "feedback": "You should use other student details and student table instead of other details and student enrolment table respectively.", "context": "What other details can you tell me about students in reverse alphabetical order? || select other_details from student_enrolment order by other_details desc || student_transcripts_tracking | students : other_student_details || You should use other student details and student table instead of other details and student enrolment table respectively.", "label": "student_transcripts_tracking | select other_student_details from students order by other_student_details desc" }, { "prediction": "world_1 | select avg ( country.lifeexpectancy ) from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language!= 'english'", "gold_parse": "SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\")", "question": "What is average life expectancy in the countries where English is not the official language?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( Population ) FROM country WHERE Continent NOT IN ( SELECT Continent FROM country WHERE LocalName = \"English\" )", "predicted_parse_explanation": "['Step 1: find the Continent of country table for which LocalName equals English', 'Step 2: find the average Population in country table whose Continent not one of the results of step 1']", "feedback": "in step 1 , i want the name, language of countrylanguage , life expectancy , make sure t equivalent with the is official of countrylanguage.", "context": "What is average life expectancy in the countries where English is not the official language? || select avg ( population ) from country where continent not in ( select continent from country where localname = 'English' ) || world_1 | country : lifeexpectancy, code | countrylanguage : countrycode, language ( \"english\" ) || in step 1, i want the name, language of countrylanguage, life expectancy, make sure t equivalent with the is official of countrylanguage.", "label": "world_1 | select avg ( lifeexpectancy ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' )" }, { "prediction": "student_transcripts_tracking | select max ( transcript_contents.student_course_id ), student_enrolment_courses.student_enrolment_id from transcript_contents join student_enrolment_courses on transcript_contents.student_course_id = student_enrolment_courses.student_enrolment_id group by student_enrolment_courses.student_enrolment_id", "gold_parse": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the maximum number of times that a course shows up in different transcripts and what is that course's enrollment id?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Max ( student_course_id ) , course_id FROM Student_Enrolment_Courses GROUP BY course_id", "predicted_parse_explanation": "['find each value of course_id in Student_Enrolment_Courses table along with the maximum student_course_id of the corresponding rows to each value']", "feedback": "I want the number of time course apperaed in transcription contents.", "context": "What is the maximum number of times that a course shows up in different transcripts and what is that course's enrollment id? || select max ( student_course_id ), course_id from student_enrolment_courses group by course_id || student_transcripts_tracking | transcript_contents : student_course_id | student_enrolment_courses : student_enrolment_id || I want the number of time course apperaed in transcription contents.", "label": "student_transcripts_tracking | select count ( * ), student_course_id from transcript_contents group by student_course_id order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1", "question": "Which airline has most number of flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines GROUP BY Airline ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Airline in airlines table', 'Step 2: find Airline of airlines table with largest value in the results of step 1']", "feedback": "You need to interchange flights table for airlines table in step 1.", "context": "Which airline has most number of flights? || select airline from airlines group by airline order by count ( * ) desc limit 1 || flight_2 | airlines : airline, uid | flights : airline || You need to interchange flights table for airlines table in step 1.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) desc limit 1" }, { "prediction": "employee_hire_evaluation | select shop.name, count ( * ) from hiring join shop on hiring.shop_id = shop.shop_id group by shop.name", "gold_parse": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name", "question": "Find the number of employees hired in each shop; show the shop name as well.", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , T1.Name FROM shop AS T1 JOIN hiring AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T2.Shop_ID", "predicted_parse_explanation": "['Step 1: For each row in shop table, find the corresponding rows in hiring table', \"Step 2: find each value of hiring's Shop_ID in the results of step 1 along with the number of the corresponding rows to each value\"]", "feedback": "Replace hiring's shop id with shop's name and find corresponding rows in hiring table .", "context": "Find the number of employees hired in each shop; show the shop name as well. || select count ( * ), shop.name from shop join hiring on shop.shop_id = hiring.shop_id group by hiring.shop_id || employee_hire_evaluation | shop : name, shop_id | hiring : shop_id || Replace hiring's shop id with shop's name and find corresponding rows in hiring table.", "label": "employee_hire_evaluation | select count ( * ), shop.name from hiring join shop on hiring.shop_id = shop.shop_id group by shop.name" }, { "prediction": "cre_Doc_Template_Mgt | select templates.template_id from templates join ref_template_types on templates.template_type_code = ref_template_types.template_type_code where ref_template_types.template_type_description = 'Presentation'", "gold_parse": "SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = \"Presentation\"", "question": "Return the ids corresponding to templates with the description 'Presentation'.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID FROM Documents WHERE Document_Description = \"Presentation\"", "predicted_parse_explanation": "['find the Document_ID of Documents table for which Document_Description equals Presentation']", "feedback": "Find template id of templates table for which template type description equals Presentation .", "context": "Return the ids corresponding to templates with the description 'Presentation'. || select document_id from documents where document_description = 'Presentation' || cre_Doc_Template_Mgt | templates : template_id, template_type_code | ref_template_types : template_type_code, template_type_description ( \"Presentation\" ) || Find template id of templates table for which template type description equals Presentation.", "label": "cre_Doc_Template_Mgt | select templates.template_id from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code where ref_template_types.template_type_description = 'Presentation'" }, { "prediction": "wta_1 | select count ( * ), hand from players group by hand", "gold_parse": "SELECT count(*) , hand FROM players GROUP BY hand", "question": "Find the number of players for each hand type.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.hand , Count ( * ) FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T2.loser_id", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find each value of loser_id in the results of step 1 along with the number of the corresponding rows to each value']", "feedback": "In step 2, You should supplant hand rather than id of loser.", "context": "Find the number of players for each hand type. || select players.hand, count ( * ) from players join matches on players.player_id = matches.loser_id group by matches.loser_id || wta_1 | players : hand || In step 2, You should supplant hand rather than id of loser.", "label": "wta_1 | select count ( * ), hand from players group by hand" }, { "prediction": "cre_Doc_Template_Mgt | select template_type_code, count ( * ) from templates group by template_type_code", "gold_parse": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code", "question": "What are the different template type codes, and how many documents use each type?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_Type_Code , Count ( * ) FROM Templates GROUP BY Template_Type_Code", "predicted_parse_explanation": "['find each value of Template_Type_Code in Templates table along with the number of the corresponding rows to each value']", "feedback": "It should be number of corresponding rows for each template type code in documents table .", "context": "What are the different template type codes, and how many documents use each type? || select template_type_code, count ( * ) from templates group by template_type_code || cre_Doc_Template_Mgt | templates : template_type_code || It should be number of corresponding rows for each template type code in documents table.", "label": "cre_Doc_Template_Mgt | select templates.template_type_code, count ( * ) from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code" }, { "prediction": "student_transcripts_tracking | select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id group by courses.course_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the course with the most students enrolled?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name FROM Courses GROUP BY course_name ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of course_name in Courses table', 'Step 2: find course_name of Courses table with largest value in the results of step 1']", "feedback": "you should use course Id from student enrolment courses table in step 1.", "context": "What is the name of the course with the most students enrolled? || select course_name from courses group by course_name order by count ( * ) desc limit 1 || student_transcripts_tracking | courses : course_name, course_id | student_enrolment_courses : course_id || you should use course Id from student enrolment courses table in step 1.", "label": "student_transcripts_tracking | select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id group by courses.course_name order by count ( * ) desc limit 1" }, { "prediction": "network_1 | select highschooler.name from highschooler join likes on highschooler.id = likes.student_id group by likes.student_id having count ( * ) >= 2", "gold_parse": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2", "question": "What are the names of students who have 2 or more likes?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.name FROM Highschooler AS T1 JOIN Friend AS T2 ON T1.ID = T2.student_id GROUP BY T2.student_id HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: For each row in Highschooler table, find the corresponding rows in Friend table', 'Step 2: find the number of rows of each value of student_id in the results of step 1', 'Step 3: find name in the results of step 1 whose corresponding value in step 2 is greater than or equals 2']", "feedback": "Likes table should be used as replacement of friend table in 1st step.", "context": "What are the names of students who have 2 or more likes? || select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id having count ( * ) > = 2 || network_1 | highschooler : name, id | likes : student_id || Likes table should be used as replacement of friend table in 1st step.", "label": "network_1 | select highschooler.name from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id having count ( * ) >= 2" }, { "prediction": "world_1 | select city.name from city join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'english' group by city.name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = \"English\" ORDER BY T1.Population DESC LIMIT 1", "question": "Find the city with the largest population that uses English.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Name = \"English\" ORDER BY T1.Population Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in city table', \"Step 2: find the city's Name in the results of step 1 whose country's Name equals English ordered descending by city's Population\", 'Step 3: only show the first row of the results']", "feedback": "Exchange name of the country table with language of countrylanguage table in step 2. In step 1, equivalence to countrylanguage also.", "context": "Find the city with the largest population that uses English. || select city.name from city join country on city.countrycode = country.code where country.name = 'English' order by city.population desc limit 1 || world_1 | city : name, countrycode, population | countrylanguage : countrycode, language ( \"english\" ) || Exchange name of the country table with language of countrylanguage table in step 2. In step 1, equivalence to countrylanguage also.", "label": "world_1 | select city.name, city.population from city join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'English' order by city.population desc limit 1" }, { "prediction": "flight_2 | select count ( * ) from airports join flights on airports.airportcode = flights.sourceairport where airports.airportcode = 'ATO'", "gold_parse": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"", "question": "How many flights have destination ATO?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE Country = \"ATO\"", "predicted_parse_explanation": "['find the number of rows in airports table whose Country equals ATO']", "feedback": "Exchange 'airports table whose Country' with 'flights table whose DestAirport'.", "context": "How many flights have destination ATO? || select count ( * ) from airports where country = 'ATO' || flight_2 | airports : airportcode ( \"ATO\" ) | flights : sourceairport || Exchange 'airports table whose Country' with 'flights table whose DestAirport'.", "label": "flight_2 | select count ( * ) from flights where destairport = 'ATO'" }, { "prediction": "world_1 | select countrycode from country where governmentform!= 'Republic' and language!= 'english'", "gold_parse": "SELECT Code FROM country WHERE GovernmentForm != \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "question": "What are the codes of the countries that do not speak English and whose government forms are not Republic?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Code FROM country AS T1 WHERE T1.Continent = ( SELECT T2.CountryCode FROM countrylanguage AS T2 WHERE T2.Language = \"Republic\" ) EXCEPT SELECT T1.Code FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\"", "predicted_parse_explanation": "['Step 1: find the CountryCode of countrylanguage table for which Language equals Republic', 'Step 2: find the Code of country table whose Continent equals the results of step 1', 'Step 3: For each row in country table, find the corresponding rows in countrylanguage table', 'Step 4: find Code of the results of step 3 whose Language equals English', 'Step 5: show the rows that are in the results of step 2 but not in the results of step 4']", "feedback": "You should use government form instead of language and also make sure that value should not be in the result of step 2 and 4.", "context": "What are the codes of the countries that do not speak English and whose government forms are not Republic? || select country.code from country where country.continent = ( select countrylanguage.countrycode from countrylanguage where countrylanguage.language = 'Republic' ) except select country.code from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' || world_1 | country : code, governmentform ( \"Republic\" ) | countrylanguage : countrycode, language ( \"english\" ) || You should use government form instead of language and also make sure that value should not be in the result of step 2 and 4.", "label": "world_1 | select code from country where governmentform!= 'Republic' except select countrycode from countrylanguage where language = 'English'" }, { "prediction": "course_teach | select name from teacher where teacher_id not in ( select teacher_id from course_arrange )", "gold_parse": "SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)", "question": "What are the names of the teachers whose courses have not been arranged?", "db_id": "course_teach", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "course", "teacher", "course_arrange" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2 ], "column_name": [ "*", "Course_ID", "Staring_Date", "Course", "Teacher_ID", "Name", "Age", "Hometown", "Course_ID", "Teacher_ID", "Grade" ] }, "db_foreign_keys": { "column_id": [ 9, 8 ], "other_column_id": [ 4, 1 ] }, "predicted_parse_with_values": "SELECT Name FROM teacher EXCEPT SELECT Name FROM teacher", "predicted_parse_explanation": "['Step 1: find the Name of teacher table', 'Step 2: find the Name of teacher table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "In step 2 show teacher's name whose teacher id is present under course arrange table .", "context": "What are the names of the teachers whose courses have not been arranged? || select name from teacher except select name from teacher || course_teach | teacher : name, teacher_id | course_arrange : teacher_id || In step 2 show teacher's name whose teacher id is present under course arrange table.", "label": "course_teach | select name from teacher where teacher_id not in ( select teacher_id from course_arrange )" }, { "prediction": "student_transcripts_tracking | select other_student_details from students order by other_student_details desc", "gold_parse": "SELECT other_student_details FROM Students ORDER BY other_student_details DESC", "question": "List all the student details in reversed lexicographical order.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT * FROM Students ORDER BY date_left Desc", "predicted_parse_explanation": "['find the rows of Students table ordered descending by date_left']", "feedback": "You need to put other pupils information.", "context": "List all the student details in reversed lexicographical order. || select * from students order by date_left desc || student_transcripts_tracking | students : other_student_details || You need to put other pupils information.", "label": "student_transcripts_tracking | select other_student_details from students order by other_student_details desc" }, { "prediction": "car_1 | select min ( weight ) from cars_data where cylinders = 8 and year = 1974", "gold_parse": "SELECT Weight FROM CARS_DATA WHERE Cylinders = 4 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1", "question": "What is the smallest weight of the car produced with 8 cylinders on 1974?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Min ( Weight ) FROM cars_data WHERE Year = 1", "predicted_parse_explanation": "['find the minimum Weight in cars_data table whose Year equals 1']", "feedback": "make sure year should be 1974 and cylinders equivalent with 8.", "context": "What is the smallest weight of the car produced with 8 cylinders on 1974? || select min ( weight ) from cars_data where year = 1 || car_1 | cars_data : weight, cylinders ( 8 ), year ( 1974 ) || make sure year should be 1974 and cylinders equivalent with 8.", "label": "car_1 | select weight from cars_data where cylinders = 4 and year = 1974 order by weight asc limit 1" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"", "question": "Which airlines have a flight with source airport AHD?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines WHERE Abbreviation = \"AHD\"", "predicted_parse_explanation": "['find the Airline of airlines table for which Abbreviation equals AHD']", "feedback": "abbreviation is wrong find source airport instead of that .", "context": "Which airlines have a flight with source airport AHD? || select airline from airlines where abbreviation = 'AHD' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"AHD\" ) || abbreviation is wrong find source airport instead of that.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'" }, { "prediction": "student_transcripts_tracking | select transcript_date, other_details from transcripts", "gold_parse": "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", "question": "What is the earliest date of a transcript release, and what details can you tell me?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT transcript_date , other_details FROM Transcripts", "predicted_parse_explanation": "['find the transcript_date, other_details of Transcripts table']", "feedback": "Provide me the id of transcript and also look for the lowest value of transcript date. ", "context": "What is the earliest date of a transcript release, and what details can you tell me? || select transcript_date, other_details from transcripts || student_transcripts_tracking | transcripts : transcript_date, other_details || Provide me the id of transcript and also look for the lowest value of transcript date.", "label": "student_transcripts_tracking | select transcript_date, other_details from transcripts order by transcript_date asc limit 1" }, { "prediction": "dog_kennels | select cost_of_treatment, date_of_treatment from treatments order by date_of_treatment desc limit 1", "gold_parse": "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1", "question": "How much does the most recent treatment cost?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT * FROM Treatments ORDER BY date_of_treatment Asc LIMIT 1", "predicted_parse_explanation": "['find the rows of Treatments table with smallest value of date_of_treatment']", "feedback": "Provide largest value not smallest value of date .", "context": "How much does the most recent treatment cost? || select * from treatments order by date_of_treatment asc limit 1 || dog_kennels | treatments : cost_of_treatment, date_of_treatment || Provide largest value not smallest value of date.", "label": "dog_kennels | select cost_of_treatment from treatments order by date_of_treatment desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select template_type_code from templates except select templates.template_type_code from documents join templates on documents.template_id = templates.template_id", "gold_parse": "SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", "question": "What are the codes of template types that are not used for any document?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T1.Template_Type_Code FROM Ref_Template_Types AS T1 EXCEPT SELECT T2.Template_Type_Code FROM Templates AS T2", "predicted_parse_explanation": "['Step 1: find the Template_Type_Code of Ref_Template_Types table', 'Step 2: find the Template_Type_Code of Templates table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "template type code of templates table whose corresponding template id present in documents table in step 2", "context": "What are the codes of template types that are not used for any document? || select ref_template_types.template_type_code from ref_template_types except select templates.template_type_code from templates as templates || cre_Doc_Template_Mgt | templates : template_type_code | documents : template_id || template type code of templates table whose corresponding template id present in documents table in step 2", "label": "cre_Doc_Template_Mgt | select template_type_code from templates except select template_type_code from templates join documents on templates.template_id = documents.template_id" }, { "prediction": "dog_kennels | select owners.owner_id, owners.zip_code from owners join dogs on owners.owner_id = dogs.owner_id group by owners.owner_id order by sum ( dogs.cost_of_treatment ) desc limit 1", "gold_parse": "SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1", "question": "Find the owner id and zip code of the owner who spent the most money in total for his or her dogs.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id GROUP BY T2.owner_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Owners table, find the corresponding rows in Dogs table', \"Step 2: find the number of rows of each value of Dogs's owner_id in the results of step 1\", \"Step 3: find Dogs's owner_id, zip_code of step 1 results with largest value in the results of step 2\"]", "feedback": "Add treatments table . Ensure to find total date of treatment for all dogs owned by each owner id .", "context": "Find the owner id and zip code of the owner who spent the most money in total for his or her dogs. || select dogs.owner_id, owners.zip_code from owners join dogs on owners.owner_id = dogs.owner_id group by dogs.owner_id order by count ( * ) desc limit 1 || dog_kennels | owners : owner_id, zip_code | dogs : owner_id, cost_of_treatment || Add treatments table. Ensure to find total date of treatment for all dogs owned by each owner id.", "label": "dog_kennels | select owners.owner_id, owners.zip_code from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id group by owners.owner_id order by sum ( treatments.cost_of_treatment ) desc limit 1" }, { "prediction": "student_transcripts_tracking | select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id group by courses.course_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1", "question": "What's the name of the course with most number of enrollments?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name FROM Courses GROUP BY course_name ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of course_name in Courses table', 'Step 2: find course_name of Courses table with largest value in the results of step 1']", "feedback": "Find number of rows of each value of course id in student enrolment courses table in step 1.", "context": "What's the name of the course with most number of enrollments? || select course_name from courses group by course_name order by count ( * ) desc limit 1 || student_transcripts_tracking | courses : course_name, course_id | student_enrolment_courses : course_id || Find number of rows of each value of course id in student enrolment courses table in step 1.", "label": "student_transcripts_tracking | select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id group by courses.course_name order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"", "question": "Which airlines have a flight with source airport AHD?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines WHERE Abbreviation = \"AHD\"", "predicted_parse_explanation": "['find the Airline of airlines table for which Abbreviation equals AHD']", "feedback": "you have to use source airport instead of abbreviation.", "context": "Which airlines have a flight with source airport AHD? || select airline from airlines where abbreviation = 'AHD' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"AHD\" ) || you have to use source airport instead of abbreviation.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'" }, { "prediction": "world_1 | select city.name from city join country on city.countrycode = country.code join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'english'", "gold_parse": "SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')", "question": "What are the names of cities in Europe for which English is not the official language?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = \"T\" EXCEPT SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = \"Europe\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in city table', \"Step 2: find city's Name of the results of step 1 whose Continent equals T\", \"Step 3: find city's Name of the results of step 1 whose Continent equals Europe\", 'Step 4: show the rows that are in the results of step 2 but not in the results of step 3']", "feedback": "make sure that english should be language and f should be the is official in step 2 , include countrylanguageb table , need to view both results.", "context": "What are the names of cities in Europe for which English is not the official language? || select city.name from city join country on city.countrycode = country.code where country.continent = 'T' except select city.name from city join country on city.countrycode = country.code where country.continent = 'Europe' || world_1 | city : name, countrycode | country : code, continent ( \"Europe\" ) | countrylanguage : countrycode, language ( \"english\" ) || make sure that english should be language and f should be the is official in step 2, include countrylanguageb table, need to view both results.", "label": "world_1 | select distinct city.name from country join city on city.countrycode = country.code where country.continent = 'Europe' and country.name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'English' )" }, { "prediction": "student_transcripts_tracking | select first_name from students where permanent_address_id = ( select permanent_address_id from students where cell_mobile_number = '09700166582' )", "gold_parse": "SELECT T1.first_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.permanent_address_id = T2.address_id WHERE T2.country = 'Haiti' UNION SELECT first_name FROM Students WHERE cell_mobile_number = '09700166582'", "question": "What are the first names of the students who live in Haiti permanently or have the cell phone number 09700166582?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT first_name FROM Students WHERE cell_mobile_number LIKE \"Haiti\" UNION SELECT first_name FROM Students WHERE cell_mobile_number = 09700166582", "predicted_parse_explanation": "['Step 1: find the first_name of Students table for which cell_mobile_number contains Haiti', 'Step 2: find the first_name of Students table for which cell_mobile_number equals 09700166582', 'Step 3: show the rows that are in any of the results of step 1 or the results of step 2']", "feedback": "I want permanent address whose Addresses' country is Haiti in step 1.", "context": "What are the first names of the students who live in Haiti permanently or have the cell phone number 09700166582? || select first_name from students where cell_mobile_number like 'Haiti' union select first_name from students where cell_mobile_number = 09700166582 || student_transcripts_tracking | students : first_name, permanent_address_id, cell_mobile_number ( \"09700166582\" ) || I want permanent address whose Addresses' country is Haiti in step 1.", "label": "student_transcripts_tracking | select students.first_name from students join addresses on students.permanent_address_id = addresses.address_id where addresses.country = 'Haiti' union select first_name from students where cell_mobile_number = '09700166582'" }, { "prediction": "student_transcripts_tracking | select max ( transcript_contents.student_course_id ), count ( * ) from student_enrolment_courses join transcript_contents on student_enrolment_courses.student_enrolment_id = transcript_contents.student_course_id group by student_enrolment_courses.student_enrolment_id", "gold_parse": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the maximum number of times that a course shows up in different transcripts and what is that course's enrollment id?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Max ( student_course_id ) , course_id FROM Student_Enrolment_Courses GROUP BY course_id", "predicted_parse_explanation": "['find each value of course_id in Student_Enrolment_Courses table along with the maximum student_course_id of the corresponding rows to each value']", "feedback": "find how many times the course appeared in transcript contents", "context": "What is the maximum number of times that a course shows up in different transcripts and what is that course's enrollment id? || select max ( student_course_id ), course_id from student_enrolment_courses group by course_id || student_transcripts_tracking | transcript_contents : student_course_id | student_enrolment_courses : student_enrolment_id || find how many times the course appeared in transcript contents", "label": "student_transcripts_tracking | select count ( * ), student_course_id from transcript_contents group by student_course_id order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select airports.city from airports join flights on airports.airportname = flights.sourceairport join airports on flights.destinationairport = flights.destinationairport group by airports.city order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "question": "Which city has the most frequent destination airport?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT City FROM airports GROUP BY City ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of City in airports table', 'Step 2: find City of airports table with largest value in the results of step 1']", "feedback": "Substitute city in airports table with city of destination airport in flights table in step 1.", "context": "Which city has the most frequent destination airport? || select city from airports group by city order by count ( * ) desc limit 1 || flight_2 | airports : city, airportname | flights : sourceairport, destinationairport || Substitute city in airports table with city of destination airport in flights table in step 1.", "label": "flight_2 | select airports.city from airports join flights on airports.airportcode = flights.destairport group by airports.city order by count ( * ) desc limit 1" }, { "prediction": "car_1 | select count ( * ) from cars_data where horsepower > 150", "gold_parse": "SELECT count(*) FROM CARS_DATA WHERE horsepower > 150", "question": "What is the number of the cars with horsepower more than 150?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM cars_data WHERE Cylinders > 150", "predicted_parse_explanation": "['find the number of rows in cars_data table whose Cylinders greater than 150']", "feedback": "Supersede cylinders with horsepower .", "context": "What is the number of the cars with horsepower more than 150? || select count ( * ) from cars_data where cylinders > 150 || car_1 | cars_data : horsepower ( 150 ) || Supersede cylinders with horsepower.", "label": "car_1 | select count ( * ) from cars_data where horsepower > 150" }, { "prediction": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French'", "gold_parse": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\" AND T2.IsOfficial = \"T\"", "question": "What are the names of nations where both English and French are official languages?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE Code2 = \"T\" INTERSECT SELECT Continent FROM country WHERE Code2 = \"French\"", "predicted_parse_explanation": "['Step 1: find the Continent of country table for which Code2 equals T', 'Step 2: find the Continent of country table for which Code2 equals French', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Replace continent with name name , code 2 with language , ensure is official equals T in both steps , T with English(step 1).", "context": "What are the names of nations where both English and French are official languages? || select continent from country where code2 = 'T' intersect select continent from country where code2 = 'French' || world_1 | country : name, code | countrylanguage : countrycode, language ( \"French\" ) || Replace continent with name name, code 2 with language, ensure is official equals T in both steps, T with English(step 1).", "label": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' and countrylanguage.isofficial = 'T'" }, { "prediction": "singer | select singer.name, sum ( song.sales ) from singer join song on singer.singer_id = song.singer_id group by singer.name", "gold_parse": "SELECT T1.Name , sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name", "question": "Show the names of singers and the total sales of their songs.", "db_id": "singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "singer", "song" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Singer_ID", "Name", "Birth_Year", "Net_Worth_Millions", "Citizenship", "Song_ID", "Title", "Singer_ID", "Sales", "Highest_Position" ] }, "db_foreign_keys": { "column_id": [ 8 ], "other_column_id": [ 1 ] }, "predicted_parse_with_values": "SELECT T1.Name , Sum ( T2.Sales ) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T2.Singer_ID", "predicted_parse_explanation": "['Step 1: For each row in singer table, find the corresponding rows in song table', 'Step 2: find each value of Singer_ID in the results of step 1 along with the summation of Sales of the corresponding rows to each value']", "feedback": "Display name of singer.", "context": "Show the names of singers and the total sales of their songs. || select singer.name, sum ( song.sales ) from singer join song on singer.singer_id = song.singer_id group by song.singer_id || singer | singer : name, singer_id | song : sales, singer_id || Display name of singer.", "label": "singer | select singer.name, sum ( song.sales ) from singer join song on singer.singer_id = song.singer_id group by singer.name" }, { "prediction": "wta_1 | select avg ( loser_age ), avg ( winner_age ) from matches", "gold_parse": "SELECT avg(loser_age) , avg(winner_age) FROM matches", "question": "Find the average age of losers and winners of all matches.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Avg ( loser_age ) , Avg ( loser_age ) FROM matches", "predicted_parse_explanation": "['find the average loser_age and the average loser_age in matches table']", "feedback": "Supersede one of the loser age with winner age .", "context": "Find the average age of losers and winners of all matches. || select avg ( loser_age ), avg ( loser_age ) from matches || wta_1 | matches : loser_age, winner_age || Supersede one of the loser age with winner age.", "label": "wta_1 | select avg ( loser_age ), avg ( winner_age ) from matches" }, { "prediction": "battle_death | select death.note from battle join death on battle.id = death.id where battle.name like '%East%'", "gold_parse": "SELECT note FROM death WHERE note LIKE '%East%'", "question": "What are the notes of the death events which has substring 'East'?", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT T3.note FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id WHERE T1.date LIKE \"East\"", "predicted_parse_explanation": "['Step 1: For each row in ship table, find corresponding rows in battle table and in death table', 'Step 2: find note of the results of step 1 whose date contains East']", "feedback": "In step 2 find note which contains the word 'east'.", "context": "What are the notes of the death events which has substring 'East'? || select death.note from battle join ship on battle.id = ship.lost_in_battle join death on ship.id = death.caused_by_ship_id where battle.date like 'East' || battle_death | death : note, id | battle : id, name ( \"%East%\" ) || In step 2 find note which contains the word 'east'.", "label": "battle_death | select note from death where note like '%East%'" }, { "prediction": "flight_2 | select count ( * ) from airlines join flights on airlines.uid = flights.airline join airports on flights.sourceairport = airports.city where airports.airportcode = 'ASY' and airlines.airline = 'United Airlines'", "gold_parse": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"", "question": "How many 'United Airlines' flights go to Airport 'ASY'?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"United Airlines\" AND T1.Airline = \"ASY\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in airports table', \"Step 2: find the number of rows in the results of step 1 whose airports's Country equals United Airlines and Airline equals ASY\"]", "feedback": "Step 1 switch airports with flights , Step 2 switch airports's country with airlines's airline and airline with destination airport .", "context": "How many 'United Airlines' flights go to Airport 'ASY'? || select count ( * ) from airlines join airports where airports.country = 'United Airlines' and airlines.airline = 'ASY' || flight_2 | airlines : uid, airline ( \"United Airlines\" ) | flights : airline, sourceairport | airports : city, airportcode ( \"ASY\" ) || Step 1 switch airports with flights, Step 2 switch airports's country with airlines's airline and airline with destination airport.", "label": "flight_2 | select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.destairport = 'ASY'" }, { "prediction": "world_1 | select count ( * ) from country where continent = 'Asia'", "gold_parse": "SELECT count(*) FROM country WHERE continent = \"Asia\"", "question": "how many countries are in Asia?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM city", "predicted_parse_explanation": "['find the number of rows in city table']", "feedback": "determine the number of rows of country table, where continent is asia.", "context": "how many countries are in Asia? || select count ( * ) from city || world_1 | country : continent ( \"Asia\" ) || determine the number of rows of country table, where continent is asia.", "label": "world_1 | select count ( * ) from country where continent = 'Asia'" }, { "prediction": "car_1 | select distinct model_list.model from cars_data join model_list on cars_data.model = model_list.model where cars_data.weight < 3500 except select model_list.model from car_makers join model_list on car_makers.id = model_list.maker where car_makers.fullname = 'Ford Motor Company'", "gold_parse": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company'", "question": "What are the different models wthat are lighter than 3500 but were not built by the Ford Motor Company?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT DISTINCT T1.Model FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T3.Weight > 3500 EXCEPT SELECT T1.Model FROM car_makers AS T4 JOIN model_list AS T1 ON T4.Id = T1.Maker WHERE T4.Maker = \"Ford Motor Company\"", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find without repetition model_list's Model of the results of step 1 whose Weight greater than 3500\", 'Step 3: For each row in car_makers table, find the corresponding rows in model_list table', \"Step 4: find model_list's Model of the results of step 3 whose car_makers's Maker equals Ford Motor Company\", 'Step 5: show the rows that are in the results of step 2 but not in the results of step 4']", "feedback": "In step 2 replace greater with less , in step 4 replace maker with full name .", "context": "What are the different models wthat are lighter than 3500 but were not built by the Ford Motor Company? || select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.weight > 3500 except select model_list.model from car_makers join model_list on car_makers.id = model_list.maker where car_makers.maker = 'Ford Motor Company' || car_1 | model_list : model, maker | cars_data : model, weight ( 3500 ) | car_makers : id, fullname ( \"Ford Motor Company\" ) || In step 2 replace greater with less, in step 4 replace maker with full name.", "label": "car_1 | select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id join car_makers on model_list.maker = car_makers.id where cars_data.weight < 3500 and car_makers.fullname!= 'Ford Motor Company'" }, { "prediction": "car_1 | select count ( * ) from car_makers where country = 'usa'", "gold_parse": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa'", "question": "How many car models are produced in the usa?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM car_makers WHERE Country = \"usa\"", "predicted_parse_explanation": "['find the number of rows in car_makers table whose Country equals usa']", "feedback": "Switch country with country name .", "context": "How many car models are produced in the usa? || select count ( * ) from car_makers where country = 'usa' || car_1 | car_makers : country ( \"usa\" ) || Switch country with country name.", "label": "car_1 | select count ( * ) from model_list join car_makers on model_list.maker = car_makers.id join countries on car_makers.country = countries.countryid where countries.countryname = 'usa'" }, { "prediction": "world_1 | select name, population from country group by name order by count ( * ) asc limit 3", "gold_parse": "SELECT Name FROM country ORDER BY Population ASC LIMIT 3", "question": "Return the names of the 3 countries with the fewest people.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name , Continent FROM country GROUP BY Continent ORDER BY Count ( * ) Asc LIMIT 3", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Continent in country table', 'Step 2: find Name, Continent of country table ordered ascending by the results of step 1', 'Step 3: only show the first 3 rows of the results']", "feedback": "In step 1 , determine population for each country's name name and in step 2 remove continent .", "context": "Return the names of the 3 countries with the fewest people. || select name, continent from country group by continent order by count ( * ) asc limit 3 || world_1 | country : name, population || In step 1, determine population for each country's name name and in step 2 remove continent.", "label": "world_1 | select name from country order by population asc limit 3" }, { "prediction": "network_1 | select count ( distinct friend.friend_id ) from friend join highschooler on friend.student_id = highschooler.id where highschooler.name = 'Kyle'", "gold_parse": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "question": "How many friends does the high school student Kyle have?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Highschooler WHERE grade = \"Kyle\"", "predicted_parse_explanation": "['find the number of rows in Highschooler table whose grade equals Kyle']", "feedback": "Looking for number of rows of friend table for Kyle.", "context": "How many friends does the high school student Kyle have? || select count ( * ) from highschooler where grade = 'Kyle' || network_1 | friend : friend_id, student_id | highschooler : id, name ( \"Kyle\" ) || Looking for number of rows of friend table for Kyle.", "label": "network_1 | select count ( * ) from friend join highschooler on friend.student_id = highschooler.id where highschooler.name = 'Kyle'" }, { "prediction": "student_transcripts_tracking | select students.first_name, students.mid_name, students.last_name from students join student_enrolment on students.student_id = student_enrolment.student_id where student_enrolment.degree_program_id = 'Bachelor'", "gold_parse": "SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'", "question": "What are the first, middle, and last names for everybody enrolled in a Bachelors program?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT first_name , middle_name , last_name FROM Students", "predicted_parse_explanation": "['find the first_name, middle_name, last_name of Students table']", "feedback": "Make sure that student are enrolled in Bachelor degree programs.", "context": "What are the first, middle, and last names for everybody enrolled in a Bachelors program? || select first_name, middle_name, last_name from students || student_transcripts_tracking | students : first_name, middle_name, last_name, student_id | student_enrolment : student_id, degree_program_id ( \"Bachelor\" ) || Make sure that student are enrolled in Bachelor degree programs.", "label": "student_transcripts_tracking | select distinct students.first_name, students.middle_name, students.last_name from students join student_enrolment on students.student_id = student_enrolment.student_id join degree_programs on student_enrolment.degree_program_id = degree_programs.degree_program_id where degree_programs.degree_summary_name = 'Bachelor'" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1", "question": "Which airline has most number of flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines GROUP BY Airline ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Airline in airlines table', 'Step 2: find Airline of airlines table with largest value in the results of step 1']", "feedback": "In step 1 Exchange airlines table with flights table .", "context": "Which airline has most number of flights? || select airline from airlines group by airline order by count ( * ) desc limit 1 || flight_2 | airlines : airline, uid | flights : airline || In step 1 Exchange airlines table with flights table.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) desc limit 1" }, { "prediction": "orchestra | select name from conductor order by year_of_work desc limit 1", "gold_parse": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1", "question": "What is the name of the conductor who has worked the greatest number of years?", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID ORDER BY T2.Year_of_Founded Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in conductor table, find the corresponding rows in orchestra table', 'Step 2: find Name of the results of step 1 with largest value of Year_of_Founded']", "feedback": "It should be year of work , not year of founded in step 2.", "context": "What is the name of the conductor who has worked the greatest number of years? || select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id order by orchestra.year_of_founded desc limit 1 || orchestra | conductor : name, year_of_work || It should be year of work, not year of founded in step 2.", "label": "orchestra | select name from conductor order by year_of_work desc limit 1" }, { "prediction": "dog_kennels | select count ( distinct dog_id ) from treatments", "gold_parse": "SELECT count(DISTINCT dog_id) FROM Treatments", "question": "Count the number of dogs that went through a treatment.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Breeds", "predicted_parse_explanation": "['find the number of rows in Breeds table']", "feedback": "Search for the number of rows in treatments table .", "context": "Count the number of dogs that went through a treatment. || select count ( * ) from breeds || dog_kennels | treatments : dog_id || Search for the number of rows in treatments table.", "label": "dog_kennels | select count ( distinct dog_id ) from treatments" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from documents", "gold_parse": "SELECT count(*) FROM Documents", "question": "How many documents do we have?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "You need to use table of documents.", "context": "How many documents do we have? || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | documents : || You need to use table of documents.", "label": "cre_Doc_Template_Mgt | select count ( * ) from documents" }, { "prediction": "employee_hire_evaluation | select manager_name, district from shop order by number_products desc limit 1", "gold_parse": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1", "question": "Find the manager name and district of the shop whose number of products is the largest.", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT T1.Name , T1.District FROM shop AS T1 JOIN hiring AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T2.Shop_ID ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in shop table, find the corresponding rows in hiring table', \"Step 2: find the number of rows of each value of hiring's Shop_ID in the results of step 1\", 'Step 3: find Name, District of step 1 results with largest value in the results of step 2']", "feedback": "manager name not name and use number products instead of step 2 results", "context": "Find the manager name and district of the shop whose number of products is the largest. || select shop.name, shop.district from shop join hiring on shop.shop_id = hiring.shop_id group by hiring.shop_id order by count ( * ) desc limit 1 || employee_hire_evaluation | shop : manager_name, district, number_products || manager name not name and use number products instead of step 2 results", "label": "employee_hire_evaluation | select manager_name, district from shop order by number_products desc limit 1" }, { "prediction": "student_transcripts_tracking | select semesters.semester_name, semesters.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id group by semesters.semester_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the semester which most student registered in? Show both the name and the id.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT semester_name , semester_id FROM Semesters GROUP BY semester_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of semester_id in Semesters table', 'Step 2: find semester_name, semester_id of Semesters table with largest value in the results of step 1']", "feedback": "Replace semesters table with student enrolment table in step 1.", "context": "What is the semester which most student registered in? Show both the name and the id. || select semester_name, semester_id from semesters group by semester_id order by count ( * ) desc limit 1 || student_transcripts_tracking | semesters : semester_name, semester_id | student_enrolment : semester_id || Replace semesters table with student enrolment table in step 1.", "label": "student_transcripts_tracking | select semesters.semester_name, semesters.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id group by semesters.semester_id order by count ( * ) desc limit 1" }, { "prediction": "orchestra | select major_record_format from orchestra order by major_record_format asc", "gold_parse": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC", "question": "Please show the record formats of orchestras in ascending order of count.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT If_first_show FROM show ORDER BY If_first_show Asc", "predicted_parse_explanation": "['find the If_first_show of show table ordered ascending by If_first_show']", "feedback": "You should determine the major record format from the orchestra table and make sure it is arranged in ascending order of number of rows that appear for each major record format.", "context": "Please show the record formats of orchestras in ascending order of count. || select if_first_show from show order by if_first_show asc || orchestra | orchestra : major_record_format || You should determine the major record format from the orchestra table and make sure it is arranged in ascending order of number of rows that appear for each major record format.", "label": "orchestra | select major_record_format from orchestra group by major_record_format order by count ( * ) asc" }, { "prediction": "student_transcripts_tracking | select line_1, line_2 from addresses", "gold_parse": "SELECT line_1 , line_2 FROM addresses", "question": "what are all the addresses including line 1 and line 2?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT line_1 FROM Addresses WHERE line_1 = \"2294 Grant Square Apt. 235\" INTERSECT SELECT line_1 FROM Addresses WHERE line_1 = \"2294 Grant Square Apt. 235\"", "predicted_parse_explanation": "['Step 1: find the line_1 of Addresses table for which line_1 equals 2294 Grant Square Apt. 235', 'Step 2: find the line_1 of Addresses table for which line_1 equals 2294 Grant Square Apt. 235', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Remove second part in both step and change line 1 with line 2 in step2.", "context": "what are all the addresses including line 1 and line 2? || select line_1 from addresses where line_1 = '2294 Grant Square Apt. 235' intersect select line_1 from addresses where line_1 = '2294 Grant Square Apt. 235' || student_transcripts_tracking | addresses : line_1, line_2 || Remove second part in both step and change line 1 with line 2 in step2.", "label": "student_transcripts_tracking | select line_1, line_2 from addresses" }, { "prediction": "pets_1 | select count ( * ) from has_pet join student on has_pet.petid = student.stuid where student.age > 20", "gold_parse": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", "question": "Find number of pets owned by students who are older than 20.", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Pets WHERE pet_age > 20", "predicted_parse_explanation": "['find the number of rows in Pets table whose pet_age greater than 20']", "feedback": "Put has pet table and age instead of pets table and pet age .", "context": "Find number of pets owned by students who are older than 20. || select count ( * ) from pets where pet_age > 20 || pets_1 | has_pet : petid, stuid | student : stuid, age ( 20 ) | pets : petid || Put has pet table and age instead of pets table and pet age.", "label": "pets_1 | select count ( * ) from student join has_pet on student.stuid = has_pet.stuid where student.age > 20" }, { "prediction": "car_1 | select model_list.model from model_list join cars_data on model_list.model = cars_data.model where cars_data.weight < 3500 except select model_list.model from model_list join cars_data on model_list.maker = cars_data.model where cars_data.make = 'Ford Motor Company'", "gold_parse": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company'", "question": "Which models are lighter than 3500 but not built by the 'Ford Motor Company'?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T1.Model FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T3.Weight > 3500 EXCEPT SELECT T1.Model FROM car_makers AS T4 JOIN model_list AS T1 ON T4.Id = T1.Maker WHERE T4.Maker = \"Ford Motor Company\"", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find model_list's Model of the results of step 1 whose Weight greater than 3500\", 'Step 3: For each row in car_makers table, find the corresponding rows in model_list table', \"Step 4: find model_list's Model of the results of step 3 whose car_makers's Maker equals Ford Motor Company\", 'Step 5: show the rows that are in the results of step 2 but not in the results of step 4']", "feedback": "Weight should not be equal to or more than 3500 in step 2.", "context": "Which models are lighter than 3500 but not built by the 'Ford Motor Company'? || select model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.weight > 3500 except select model_list.model from car_makers join model_list on car_makers.id = model_list.maker where car_makers.maker = 'Ford Motor Company' || car_1 | model_list : model, maker | cars_data : model, weight ( 3500 ), make ( \"Ford Motor Company\" ) || Weight should not be equal to or more than 3500 in step 2.", "label": "car_1 | select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id join car_makers on model_list.maker = car_makers.id where cars_data.weight < 3500 and car_makers.fullname!= 'Ford Motor Company'" }, { "prediction": "singer | select name from singer where birth_year = 1948 or birth_year = 1949", "gold_parse": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949", "question": "What are the names of the singers whose birth years are either 1948 or 1949?", "db_id": "singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "singer", "song" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Singer_ID", "Name", "Birth_Year", "Net_Worth_Millions", "Citizenship", "Song_ID", "Title", "Singer_ID", "Sales", "Highest_Position" ] }, "db_foreign_keys": { "column_id": [ 8 ], "other_column_id": [ 1 ] }, "predicted_parse_with_values": "SELECT Name FROM singer WHERE Citizenship = 1949 OR Citizenship = 1948", "predicted_parse_explanation": "['find Name of singer table whose Citizenship equals 1948 or Citizenship equals 1949']", "feedback": "There should be birth year instead of citizenship .", "context": "What are the names of the singers whose birth years are either 1948 or 1949? || select name from singer where citizenship = 1949 or citizenship = 1948 || singer | singer : name, birth_year ( 1949 ) || There should be birth year instead of citizenship.", "label": "singer | select name from singer where birth_year = 1948 or birth_year = 1949" }, { "prediction": "dog_kennels | select count ( distinct professional_id ) from treatments union select dog_id from treatments", "gold_parse": "SELECT count(DISTINCT professional_id) FROM Treatments", "question": "How many professionals have performed any treatment to dogs?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Dogs WHERE weight = 7.57", "predicted_parse_explanation": "['find the number of rows in Dogs table whose weight equals 7.57']", "feedback": "in the treatment's table, you need to determine the number of rows for distinct professional id.", "context": "How many professionals have performed any treatment to dogs? || select count ( * ) from dogs where weight = 7.57 || dog_kennels | treatments : professional_id, dog_id || in the treatment's table, you need to determine the number of rows for distinct professional id.", "label": "dog_kennels | select count ( distinct professional_id ) from treatments" }, { "prediction": "wta_1 | select players.first_name, players.last_name from players join matches on players.player_id = matches.winner_name where matches.year = 2013 intersect select players.first_name, players.last_name from players join matches on players.player_id = matches.winner_name where matches.year = 2016", "gold_parse": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016", "question": "What are the names of players who won in both 2013 and 2016?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT tourney_name FROM matches WHERE year = 2013 INTERSECT SELECT tourney_name FROM matches WHERE year = 2016", "predicted_parse_explanation": "['Step 1: find the tourney_name of matches table for which year equals 2013', 'Step 2: find the tourney_name of matches table for which year equals 2016', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "For the pair of tourney name use winner name.", "context": "What are the names of players who won in both 2013 and 2016? || select tourney_name from matches where year = 2013 intersect select tourney_name from matches where year = 2016 || wta_1 | players : first_name, last_name, player_id | matches : winner_name, year ( 2016 ) || For the pair of tourney name use winner name.", "label": "wta_1 | select winner_name from matches where year = 2013 intersect select winner_name from matches where year = 2016" }, { "prediction": "student_transcripts_tracking | select student_enrolment.degree_program_id, degree_programs.degree_summary_name from student_enrolment join degree_programs on student_enrolment.degree_program_id = degree_programs.degree_program_id group by student_enrolment.degree_program_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.degree_program_id , T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1", "question": "Find the program which most number of students are enrolled in. List both the id and the summary.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_id , course_description FROM Courses GROUP BY course_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of course_id in Courses table', 'Step 2: find course_id, course_description of Courses table with largest value in the results of step 1']", "feedback": "You have to reconstitute using degree program id, student enrollment, degree's summary name and degree programs.", "context": "Find the program which most number of students are enrolled in. List both the id and the summary. || select course_id, course_description from courses group by course_id order by count ( * ) desc limit 1 || student_transcripts_tracking | student_enrolment : degree_program_id | degree_programs : degree_summary_name, degree_program_id || You have to reconstitute using degree program id, student enrollment, degree's summary name and degree programs.", "label": "student_transcripts_tracking | select degree_programs.degree_program_id, degree_programs.degree_summary_name from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id group by degree_programs.degree_program_id order by count ( * ) desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select templates.template_id from templates join ref_template_types on templates.template_type_code = ref_template_types.template_type_code where ref_template_types.template_type_description = 'Presentation'", "gold_parse": "SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = \"Presentation\"", "question": "Return the ids corresponding to templates with the description 'Presentation'.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID FROM Documents WHERE Document_Description = \"Presentation\"", "predicted_parse_explanation": "['find the Document_ID of Documents table for which Document_Description equals Presentation']", "feedback": "You need to search for id of template from templates table having presentation as a description of template type.", "context": "Return the ids corresponding to templates with the description 'Presentation'. || select document_id from documents where document_description = 'Presentation' || cre_Doc_Template_Mgt | templates : template_id, template_type_code | ref_template_types : template_type_code, template_type_description ( \"Presentation\" ) || You need to search for id of template from templates table having presentation as a description of template type.", "label": "cre_Doc_Template_Mgt | select templates.template_id from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code where ref_template_types.template_type_description = 'Presentation'" }, { "prediction": "student_transcripts_tracking | select count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id where departments.department_name = 'engineer'", "gold_parse": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", "question": "How many degrees does the engineering department offer?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Departments WHERE department_name = \"engineer\"", "predicted_parse_explanation": "['find the number of rows in Departments table whose department_name equals engineer']", "feedback": "Use degree programs table instead of departments table.", "context": "How many degrees does the engineering department offer? || select count ( * ) from departments where department_name = 'engineer' || student_transcripts_tracking | departments : department_id, department_name ( \"engineer\" ) | degree_programs : department_id || Use degree programs table instead of departments table.", "label": "student_transcripts_tracking | select count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id where departments.department_name = 'engineer'" }, { "prediction": "network_1 | select friend.name from friend join highschooler on friend.friend_id = highschooler.id where highschooler.name = 'Kyle'", "gold_parse": "SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = \"Kyle\"", "question": "Return the names of friends of the high school student Kyle.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler WHERE grade = \"Kyle\"", "predicted_parse_explanation": "['find the name of Highschooler table for which grade equals Kyle']", "feedback": "Find Highschooler's name whose friend is Kyle and who is also present in friend table .", "context": "Return the names of friends of the high school student Kyle. || select name from highschooler where grade = 'Kyle' || network_1 | friend : name, friend_id | highschooler : id, name ( \"Kyle\" ) || Find Highschooler's name whose friend is Kyle and who is also present in friend table.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id join highschooler on friend.friend_id = highschooler.id where highschooler.name = 'Kyle'" }, { "prediction": "orchestra | select major_record_format from orchestra order by major_record_format asc", "gold_parse": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC", "question": "Please show the record formats of orchestras in ascending order of count.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT If_first_show FROM show ORDER BY If_first_show Asc", "predicted_parse_explanation": "['find the If_first_show of show table ordered ascending by If_first_show']", "feedback": "Find major record format of orchestra ordered ascending by number of rows appear for each major record format .", "context": "Please show the record formats of orchestras in ascending order of count. || select if_first_show from show order by if_first_show asc || orchestra | orchestra : major_record_format || Find major record format of orchestra ordered ascending by number of rows appear for each major record format.", "label": "orchestra | select major_record_format from orchestra group by major_record_format order by count ( * ) asc" }, { "prediction": "cre_Doc_Template_Mgt | select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland'", "gold_parse": "SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'", "question": "Show the document id with paragraph text 'Brazil' and 'Ireland'.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID FROM Documents WHERE Document_Name LIKE \"Ireland\"", "predicted_parse_explanation": "['find the Document_ID of Documents table for which Document_Name contains Ireland']", "feedback": "Change document name with paragraph text and Ensure that paragraph text equals Brazil and paragraph text equals Ireland .", "context": "Show the document id with paragraph text 'Brazil' and 'Ireland'. || select document_id from documents where document_name like 'Ireland' || cre_Doc_Template_Mgt | paragraphs : document_id, paragraph_text ( \"Ireland\" ) || Change document name with paragraph text and Ensure that paragraph text equals Brazil and paragraph text equals Ireland.", "label": "cre_Doc_Template_Mgt | select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland'" }, { "prediction": "world_1 | select countrycode from countrylanguage where language = 'Spanish'", "gold_parse": "SELECT CountryCode , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "question": "Return the codes of countries for which Spanish is the predominantly spoken language.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Code FROM country WHERE LocalName = \"Spanish\"", "predicted_parse_explanation": "['find the Code of country table for which LocalName equals Spanish']", "feedback": "Also ensure that countrylanguage's is official equals T .", "context": "Return the codes of countries for which Spanish is the predominantly spoken language. || select code from country where localname = 'Spanish' || world_1 | countrylanguage : countrycode, language ( \"Spanish\" ) || Also ensure that countrylanguage's is official equals T.", "label": "world_1 | select countrycode, max ( percentage ) from countrylanguage where language = 'Spanish' group by countrycode" }, { "prediction": "dog_kennels | select dogs.name, treatments.date_of_treatment from dogs join treatments on dogs.breed_code = treatments.dog_id group by dogs.breed_code order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )", "question": "Which dogs are of the rarest breed? Show their names and treatment dates.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT name , date_of_birth FROM Dogs ORDER BY weight Desc LIMIT 1", "predicted_parse_explanation": "['find the name, date_of_birth of Dogs table with largest value of weight']", "feedback": "calculate the total number of dog breed code and also obtain name and date of treatment of treatment table for lowest value of step 1.", "context": "Which dogs are of the rarest breed? Show their names and treatment dates. || select name, date_of_birth from dogs order by weight desc limit 1 || dog_kennels | dogs : name, breed_code | treatments : date_of_treatment, dog_id || calculate the total number of dog breed code and also obtain name and date of treatment of treatment table for lowest value of step 1.", "label": "dog_kennels | select dogs.name, treatments.date_of_treatment from dogs join treatments on dogs.dog_id = treatments.dog_id where dogs.breed_code = ( select breed_code from dogs group by breed_code order by count ( * ) asc limit 1 )" }, { "prediction": "cre_Doc_Template_Mgt | select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland'", "gold_parse": "SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'", "question": "What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID FROM Documents WHERE Document_Name LIKE \"Ireland\"", "predicted_parse_explanation": "['find the Document_ID of Documents table for which Document_Name contains Ireland']", "feedback": "Use paragraph text equals Brazil and Ireland instead of document name having Ireland.", "context": "What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'? || select document_id from documents where document_name like 'Ireland' || cre_Doc_Template_Mgt | paragraphs : document_id, paragraph_text ( \"Ireland\" ) || Use paragraph text equals Brazil and Ireland instead of document name having Ireland.", "label": "cre_Doc_Template_Mgt | select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland'" }, { "prediction": "tvshow | select package_option from tv_channel where id not in ( select channel from cartoon where directed_by = 'Ben Jones' )", "gold_parse": "SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')", "question": "What are the package options of all tv channels that are not playing any cartoons directed by Ben Jones?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Package_Option FROM TV_Channel AS T1 EXCEPT SELECT T1.Package_Option FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: find the Package_Option of TV_Channel table', 'Step 2: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 3: find Package_Option of the results of step 2 whose Written_by equals Ben Jones', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "You need to use directed by instead of written by.", "context": "What are the package options of all tv channels that are not playing any cartoons directed by Ben Jones? || select tv_channel.package_option from tv_channel except select tv_channel.package_option from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Ben Jones' || tvshow | tv_channel : package_option, id | cartoon : channel, directed_by ( \"Ben Jones\" ) || You need to use directed by instead of written by.", "label": "tvshow | select package_option from tv_channel where id not in ( select channel from cartoon where directed_by = 'Ben Jones' )" }, { "prediction": "cre_Doc_Template_Mgt | select template_id, version_number, template_type_code from templates", "gold_parse": "SELECT template_id , version_number , template_type_code FROM Templates", "question": "Show template ids, version numbers, and template type codes for all templates.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_ID , Version_Number , Template_Type_Code , Template_Type_Code FROM Templates", "predicted_parse_explanation": "['find the Template_ID, Version_Number, Template_Type_Code, Template_Type_Code of Templates table']", "feedback": "Remove extra template type code .", "context": "Show template ids, version numbers, and template type codes for all templates. || select template_id, version_number, template_type_code, template_type_code from templates || cre_Doc_Template_Mgt | templates : template_id, version_number, template_type_code || Remove extra template type code.", "label": "cre_Doc_Template_Mgt | select template_id, version_number, template_type_code from templates" }, { "prediction": "poker_player | select people.name from poker_player join people on poker_player.people_id = people.people_id", "gold_parse": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", "question": "What are the names of poker players?", "db_id": "poker_player", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "poker_player", "people" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Poker_Player_ID", "People_ID", "Final_Table_Made", "Best_Finish", "Money_Rank", "Earnings", "People_ID", "Nationality", "Name", "Birth_Date", "Height" ] }, "db_foreign_keys": { "column_id": [ 2 ], "other_column_id": [ 7 ] }, "predicted_parse_with_values": "SELECT Name FROM people", "predicted_parse_explanation": "['find the Name of people table']", "feedback": "Specify people's people id is present in poker player table .", "context": "What are the names of poker players? || select name from people || poker_player | people : name, people_id | poker_player : people_id || Specify people's people id is present in poker player table.", "label": "poker_player | select people.name from people join poker_player on people.people_id = poker_player.people_id" }, { "prediction": "car_1 | select car_makers.maker, car_data.year from car_makers join cars_data on car_makers.id = cars_data.year group by car_makers.maker order by count ( * ) asc limit 1", "gold_parse": "SELECT T2.Make , T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT min(YEAR) FROM CARS_DATA)", "question": "What is the maker of the carr produced in the earliest year and what year was it?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT FullName , Maker FROM car_makers ORDER BY FullName Asc LIMIT 1", "predicted_parse_explanation": "['find the FullName, Maker of car_makers table with smallest value of FullName']", "feedback": "you need to use year in-place of both the full name.", "context": "What is the maker of the carr produced in the earliest year and what year was it? || select fullname, maker from car_makers order by fullname asc limit 1 || car_1 | car_makers : maker, id | cars_data : year || you need to use year in-place of both the full name.", "label": "car_1 | select car_names.make, cars_data.year from cars_data join car_names on cars_data.id = car_names.makeid where cars_data.year = ( select min ( year ) from cars_data )" }, { "prediction": "world_1 | select sum ( surfacearea ) from country where region = 'Caribbean'", "gold_parse": "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"", "question": "How much surface area do the countires in the Carribean cover together?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT SurfaceArea FROM country WHERE Name = \"Caribbean\"", "predicted_parse_explanation": "['find the SurfaceArea of country table for which Name equals Caribbean']", "feedback": "we need to determine the total of surface area and exchange name using region.", "context": "How much surface area do the countires in the Carribean cover together? || select surfacearea from country where name = 'Caribbean' || world_1 | country : surfacearea, region ( \"Caribbean\" ) || we need to determine the total of surface area and exchange name using region.", "label": "world_1 | select sum ( surfacearea ) from country where region = 'Caribbean'" }, { "prediction": "world_1 | select name, surfacearea from country order by surfacearea desc limit 5", "gold_parse": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5", "question": "Return the names and surface areas of the 5 largest countries.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name , SurfaceArea FROM country ORDER BY Population Desc LIMIT 5", "predicted_parse_explanation": "['Step 1: find the Name, SurfaceArea of country table ordered descending by Population', 'Step 2: only show the first 5 rows of the results']", "feedback": "i want surface area instead of population.", "context": "Return the names and surface areas of the 5 largest countries. || select name, surfacearea from country order by population desc limit 5 || world_1 | country : name, surfacearea || i want surface area instead of population.", "label": "world_1 | select name, surfacearea from country order by surfacearea desc limit 5" }, { "prediction": "car_1 | select cylinders from cars_data where model = 'Volvo' order by accelerate asc limit 1", "gold_parse": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1", "question": "For model volvo, how many cylinders does the car with the least accelerate have?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Cylinders FROM cars_data ORDER BY Accelerate Asc LIMIT 1", "predicted_parse_explanation": "['find the Cylinders of cars_data table with smallest value of Accelerate']", "feedback": "Ensure for whose model of car names equals volvo .", "context": "For model volvo, how many cylinders does the car with the least accelerate have? || select cylinders from cars_data order by accelerate asc limit 1 || car_1 | cars_data : cylinders, model ( \"Volvo\" ), accelerate || Ensure for whose model of car names equals volvo.", "label": "car_1 | select cars_data.cylinders from cars_data join car_names on cars_data.id = car_names.makeid where car_names.model = 'volvo' order by cars_data.accelerate asc limit 1" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by flights.airline having count ( * ) >= 10", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10", "question": "Find all airlines that have at least 10 flights.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines GROUP BY Airline HAVING Count ( * ) > = 10", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Airline in airlines table', 'Step 2: find Airline in airlines table whose corresponding value in step 1 is greater than or equals 10']", "feedback": "In step 1 Swap airlines table with flights table .", "context": "Find all airlines that have at least 10 flights. || select airline from airlines group by airline having count ( * ) > = 10 || flight_2 | airlines : airline, uid | flights : airline || In step 1 Swap airlines table with flights table.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) > 10" }, { "prediction": "wta_1 | select winner_name, winner_rank_points from matches group by winner_name order by count ( * ) desc limit 1", "gold_parse": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the winner who has won the most matches, and how many rank points does this player have?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT winner_name , loser_rank FROM matches GROUP BY winner_name ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of winner_name in matches table', 'Step 2: find winner_name, loser_rank of matches table with largest value in the results of step 1']", "feedback": "Supersede loser rank with summation of winner rank points in step 2.", "context": "What is the name of the winner who has won the most matches, and how many rank points does this player have? || select winner_name, loser_rank from matches group by winner_name order by count ( * ) desc limit 1 || wta_1 | matches : winner_name, winner_rank_points || Supersede loser rank with summation of winner rank points in step 2.", "label": "wta_1 | select winner_name, winner_rank_points from matches group by winner_name order by count ( * ) desc limit 1" }, { "prediction": "dog_kennels | select max ( age ) from dogs", "gold_parse": "SELECT max(age) FROM Dogs", "question": "What is the age of the oldest dog?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT age FROM Dogs ORDER BY age Asc LIMIT 1", "predicted_parse_explanation": "['find the age of Dogs table with smallest value of age']", "feedback": "There should be largest value of age instead of smallest value of age .", "context": "What is the age of the oldest dog? || select age from dogs order by age asc limit 1 || dog_kennels | dogs : age || There should be largest value of age instead of smallest value of age.", "label": "dog_kennels | select max ( age ) from dogs" }, { "prediction": "world_1 | select count ( * ) from countrylanguage where language = 'Spanish'", "gold_parse": "SELECT count(*) , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "question": "Count the number of countries for which Spanish is the predominantly spoken language.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM country WHERE LocalName = \"Spanish\"", "predicted_parse_explanation": "['find the number of rows in country table whose LocalName equals Spanish']", "feedback": "i want language not local name.", "context": "Count the number of countries for which Spanish is the predominantly spoken language. || select count ( * ) from country where localname = 'Spanish' || world_1 | countrylanguage : percentage, language ( \"Spanish\" ) || i want language not local name.", "label": "world_1 | select count ( * ), max ( percentage ) from countrylanguage where language = 'Spanish' group by countrycode" }, { "prediction": "network_1 | select student_id from student except select student_id from friend", "gold_parse": "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend", "question": "Show ids of all students who do not have any friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.ID FROM Highschooler AS T1 EXCEPT SELECT T2.liked_id FROM Likes AS T2", "predicted_parse_explanation": "['Step 1: find the ID of Highschooler table', 'Step 2: find the liked_id of Likes table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "In Step 2 Supplant liked id of likes table with student id of friend Table .", "context": "Show ids of all students who do not have any friends. || select highschooler.id from highschooler except select likes.liked_id from likes as likes || network_1 | student : student_id | friend : student_id || In Step 2 Supplant liked id of likes table with student id of friend Table.", "label": "network_1 | select id from highschooler except select student_id from friend" }, { "prediction": "car_1 | select sum ( cylinders ) from cars_data order by accelerate asc limit 1", "gold_parse": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1", "question": "For a volvo model, how many cylinders does the version with least accelerate have?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM cars_data WHERE Accelerate = 1", "predicted_parse_explanation": "['find the number of rows in cars_data table whose Accelerate equals 1']", "feedback": "i want the name from cars data table with lowest accelerate and volvo should be the model of car name's.", "context": "For a volvo model, how many cylinders does the version with least accelerate have? || select count ( * ) from cars_data where accelerate = 1 || car_1 | cars_data : cylinders, accelerate || i want the name from cars data table with lowest accelerate and volvo should be the model of car name's.", "label": "car_1 | select cars_data.cylinders from cars_data join car_names on cars_data.id = car_names.makeid where car_names.model = 'volvo' order by cars_data.accelerate asc limit 1" }, { "prediction": "concert_singer | select name, capacity from stadium order by avg ( average ) desc limit 1", "gold_parse": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1", "question": "What is the name and capacity for the stadium with the highest average attendance?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Name , Capacity FROM stadium GROUP BY Stadium_ID ORDER BY Avg ( Average ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the average Average of each value of Stadium_ID in stadium table', 'Step 2: find Name, Capacity of stadium table with largest value in the results of step 1']", "feedback": "No need to find average of all average .", "context": "What is the name and capacity for the stadium with the highest average attendance? || select name, capacity from stadium group by stadium_id order by avg ( average ) desc limit 1 || concert_singer | stadium : name, capacity, average || No need to find average of all average.", "label": "concert_singer | select name, capacity from stadium order by average desc limit 1" }, { "prediction": "pets_1 | select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where pets.pettype = 'cat' intersect select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where pets.pettype = 'dog'", "gold_parse": "SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog'", "question": "Find the name of students who have both cat and dog pets.", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT T1.Fname FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID JOIN Pets AS T3 ON T2.PetID = T3.PetID WHERE T3.PetType = \"cat\" INTERSECT SELECT T2.StuID FROM Has_Pet AS T2 JOIN Pets AS T3 ON T2.PetID = T3.PetID WHERE T3.PetType = \"dog\"", "predicted_parse_explanation": "['Step 1: For each row in Has_Pet table, find corresponding rows in Student table and in Pets table', 'Step 2: find Fname of the results of step 1 whose PetType equals cat', 'Step 3: For each row in Pets table, find the corresponding rows in Has_Pet table', \"Step 4: find Has_Pet's StuID of the results of step 3 whose PetType equals dog\", 'Step 5: show the rows that are in both the results of step 2 and the results of step 4']", "feedback": "i want the age of pet and last name from student table having pet type cat and dog.", "context": "Find the name of students who have both cat and dog pets. || select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where pets.pettype = 'cat' intersect select has_pet.stuid from has_pet join pets on has_pet.petid = pets.petid where pets.pettype = 'dog' || pets_1 | student : fname, lname, stuid | has_pet : stuid, petid | pets : petid, pettype ( \"dog\" ) || i want the age of pet and last name from student table having pet type cat and dog.", "label": "pets_1 | select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' intersect select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog'" }, { "prediction": "world_1 | select name, population, lifeexpectancy from country where continent = 'Asia' order by surfacearea desc limit 1", "gold_parse": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1", "question": "Find the name, population and expected life length of asian country with the largest area?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name , Population , Capital FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea Desc LIMIT 1", "predicted_parse_explanation": "['find the Name, Population, Capital of country table for which Continent equals Asia with largest value of SurfaceArea']", "feedback": "use life expectancy instead of capital.", "context": "Find the name, population and expected life length of asian country with the largest area? || select name, population, capital from country where continent = 'Asia' order by surfacearea desc limit 1 || world_1 | country : name, population, lifeexpectancy, continent ( \"Asia\" ), surfacearea || use life expectancy instead of capital.", "label": "world_1 | select name, population, lifeexpectancy from country where continent = 'Asia' order by surfacearea desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs", "gold_parse": "SELECT count(*) FROM Paragraphs", "question": "How many paragraphs in total?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "Here need to count number of rows of paragraphs table instead of reference template types table .", "context": "How many paragraphs in total? || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | paragraphs : || Here need to count number of rows of paragraphs table instead of reference template types table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs" }, { "prediction": "wta_1 | select country_code from players group by country_code having count ( * ) > 50", "gold_parse": "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50", "question": "What are the codes of countries with more than 50 players?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT country_code FROM players WHERE player_id > 50", "predicted_parse_explanation": "['find the country_code of players table for which player_id greater than 50']", "feedback": "Find each value of player's country code with number of corresponding rows of each value .", "context": "What are the codes of countries with more than 50 players? || select country_code from players where player_id > 50 || wta_1 | players : country_code || Find each value of player's country code with number of corresponding rows of each value.", "label": "wta_1 | select country_code from players group by country_code having count ( * ) > 50" }, { "prediction": "car_1 | select car_makers.id, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.makeid group by car_makers.id having count ( * ) >= 2 intersect select car_makers.id, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker group by car_names.makeid having count ( * ) >= 3", "gold_parse": "SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) >= 2 INTERSECT SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model GROUP BY T1.Id HAVING count(*) > 3", "question": "What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T3.MakeId , T1.Maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.Id = T2.Maker AND T1.Id = T2.Maker JOIN car_names AS T3 ON T2.Model = T3.Model WHERE T2.Model > = 2 INTERSECT SELECT T3.MakeId , T1.Maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.Id = T2.Maker AND T1.Id = T2.Maker JOIN car_names AS T3 ON T2.Model = T3.Model WHERE T2.Model > 3", "predicted_parse_explanation": "['Step 1: For each row in model_list table, find corresponding rows in car_makers table and in car_names table', \"Step 2: find MakeId, car_makers's Maker of the results of step 1 whose model_list's Model greater than or equals 2\", \"Step 3: find MakeId, car_makers's Maker of the results of step 1 whose model_list's Model greater than 3\", 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "In step 3, you need to make sure that number of cars should be more than 3 and keep Id in both step.", "context": "What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars? || select car_names.makeid, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker and car_makers.id = model_list.maker join car_names on model_list.model = car_names.model where model_list.model > = 2 intersect select car_names.makeid, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker and car_makers.id = model_list.maker join car_names on model_list.model = car_names.model where model_list.model > 3 || car_1 | car_makers : id, maker | model_list : maker, model | car_names : makeid || In step 3, you need to make sure that number of cars should be more than 3 and keep Id in both step.", "label": "car_1 | select car_makers.id, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id having count ( * ) >= 2 intersect select car_makers.id, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.model group by car_makers.id having count ( * ) > 3" }, { "prediction": "car_1 | select countryname from countries except select countries.countryname from countries join car_makers on countries.countryid = car_makers.country", "gold_parse": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country", "question": "What are the names of the countries with no car makers?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT CountryName FROM countries EXCEPT SELECT CountryName FROM countries", "predicted_parse_explanation": "['Step 1: find the CountryName of countries table', 'Step 2: find the CountryName of countries table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "from step 2, i want country of car makers table.", "context": "What are the names of the countries with no car makers? || select countryname from countries except select countryname from countries || car_1 | countries : countryname, countryid | car_makers : country || from step 2, i want country of car makers table.", "label": "car_1 | select countryname from countries except select countries.countryname from countries join car_makers on countries.countryid = car_makers.country" }, { "prediction": "singer | select name from singer where birth_year = 1948 or birth_year = 1949", "gold_parse": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949", "question": "Show the name of singers whose birth year is either 1948 or 1949?", "db_id": "singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "singer", "song" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Singer_ID", "Name", "Birth_Year", "Net_Worth_Millions", "Citizenship", "Song_ID", "Title", "Singer_ID", "Sales", "Highest_Position" ] }, "db_foreign_keys": { "column_id": [ 8 ], "other_column_id": [ 1 ] }, "predicted_parse_with_values": "SELECT Name FROM singer WHERE Citizenship = 1949 OR Citizenship = 1948", "predicted_parse_explanation": "['find Name of singer table whose Citizenship equals 1948 or Citizenship equals 1949']", "feedback": "Interchange citizenship with birth year .", "context": "Show the name of singers whose birth year is either 1948 or 1949? || select name from singer where citizenship = 1949 or citizenship = 1948 || singer | singer : name, birth_year ( 1949 ) || Interchange citizenship with birth year.", "label": "singer | select name from singer where birth_year = 1948 or birth_year = 1949" }, { "prediction": "car_1 | select car_names.model from car_names join cars_data on car_names.makeid = cars_data.model order by cars_data.horse asc limit 1", "gold_parse": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1", "question": "What is the model of the car with the smallest amount of horsepower?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T1.Model FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id ORDER BY T3.Accelerate Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find model_list's Model of the results of step 1 with smallest value of Accelerate\"]", "feedback": "Swap accelerate with horsepower .", "context": "What is the model of the car with the smallest amount of horsepower? || select model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id order by cars_data.accelerate asc limit 1 || car_1 | car_names : model, makeid | cars_data : model, horsepower || Swap accelerate with horsepower.", "label": "car_1 | select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id order by cars_data.horsepower asc limit 1" }, { "prediction": "car_1 | select countries.countryname, car_makers.country from countries join car_makers on countries.countryid = car_makers.id group by car_makers.id having count ( * ) >= 1", "gold_parse": "SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1", "question": "What are the countries having at least one car maker? List name and id.", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Country , Id FROM car_makers GROUP BY Country HAVING Count ( * ) > = 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Country in car_makers table', 'Step 2: find Country, Id in car_makers table whose corresponding value in step 1 is greater than or equals 1']", "feedback": "Substitute country , id , car makers table with country name , country id , countries table in step 2.", "context": "What are the countries having at least one car maker? List name and id. || select country, id from car_makers group by country having count ( * ) > = 1 || car_1 | countries : countryname, countryid | car_makers : country, id || Substitute country, id, car makers table with country name, country id, countries table in step 2.", "label": "car_1 | select countries.countryname, countries.countryid from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) >= 1" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG' intersect select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\"", "question": "Find all airlines that have flights from both airports 'APG' and 'CVO'.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"APG\" INTERSECT SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"CVO\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in airports table', \"Step 2: find Airline of the results of step 1 whose airports's Country equals APG\", \"Step 3: find Airline of the results of step 1 whose airports's Country equals CVO\", 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "Exchange country with airport code in both step 2 and step 3.", "context": "Find all airlines that have flights from both airports 'APG' and 'CVO'. || select airlines.airline from airlines join airports where airports.country = 'APG' intersect select airlines.airline from airlines join airports where airports.country = 'CVO' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"CVO\" ) || Exchange country with airport code in both step 2 and step 3.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG' intersect select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO'" }, { "prediction": "world_1 | select name, population, lifeexpectancy from country where continent = 'Asia'", "gold_parse": "SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = \"Asia\" ORDER BY SurfaceArea DESC LIMIT 1", "question": "What are the name, population, and life expectancy of the largest Asian country by land?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name , Population , Continent FROM country", "predicted_parse_explanation": "['find the Name, Population, Continent of country table']", "feedback": "Change continent to life expectancy , Also mention continent equals Asia and surface area is maximum .", "context": "What are the name, population, and life expectancy of the largest Asian country by land? || select name, population, continent from country || world_1 | country : name, population, lifeexpectancy, continent ( \"Asia\" ) || Change continent to life expectancy, Also mention continent equals Asia and surface area is maximum.", "label": "world_1 | select name, population, lifeexpectancy from country where continent = 'Asia' order by surfacearea desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select paragraphs.paragraph_id, paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Welcome to NY'", "gold_parse": "SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'", "question": "What are the ids and texts of paragraphs in the document titled 'Welcome to NY'?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T2.Document_ID , T1.Date_Effective_To FROM Templates AS T1 JOIN Documents AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Document_Name = \"Welcome to NY\"", "predicted_parse_explanation": "['Step 1: For each row in Templates table, find the corresponding rows in Documents table', 'Step 2: find Document_ID, Date_Effective_To of the results of step 1 whose Document_Name equals Welcome to NY']", "feedback": "Change templates table with paragraphs table in step 1 and document id , date effective to with paragraph id , paragraph text .", "context": "What are the ids and texts of paragraphs in the document titled 'Welcome to NY'? || select documents.document_id, templates.date_effective_to from templates join documents on templates.template_id = documents.template_id where documents.document_name = 'Welcome to NY' || cre_Doc_Template_Mgt | paragraphs : paragraph_id, paragraph_text, document_id | documents : document_id, document_name ( \"Welcome to NY\" ) || Change templates table with paragraphs table in step 1 and document id, date effective to with paragraph id, paragraph text.", "label": "cre_Doc_Template_Mgt | select paragraphs.paragraph_id, paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Welcome to NY'" }, { "prediction": "world_1 | select count ( distinct governmentform ) from country where continent = 'Africa'", "gold_parse": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"", "question": "How many different forms of governments are there in Africa?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Code2 ) FROM country WHERE Continent = \"Africa\"", "predicted_parse_explanation": "['find the number of different Code2 in country table whose Continent equals Africa']", "feedback": "The code 2 is wrong . It should be government form instead .", "context": "How many different forms of governments are there in Africa? || select count ( distinct code2 ) from country where continent = 'Africa' || world_1 | country : governmentform, continent ( \"Africa\" ) || The code 2 is wrong. It should be government form instead.", "label": "world_1 | select count ( distinct governmentform ) from country where continent = 'Africa'" }, { "prediction": "network_1 | select count ( * ) from highschooler join likes on highschooler.id = likes.student_id where highschooler.name = 'Kyle'", "gold_parse": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "question": "How many likes does Kyle have?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Highschooler WHERE name = \"Kyle\"", "predicted_parse_explanation": "['find the number of rows in Highschooler table whose name equals Kyle']", "feedback": "Find number of rows in likes table whose student id's corresponding Highschooler's name equals Kyle .", "context": "How many likes does Kyle have? || select count ( * ) from highschooler where name = 'Kyle' || network_1 | highschooler : id, name ( \"Kyle\" ) | likes : student_id || Find number of rows in likes table whose student id's corresponding Highschooler's name equals Kyle.", "label": "network_1 | select count ( * ) from likes join highschooler on likes.student_id = highschooler.id where highschooler.name = 'Kyle'" }, { "prediction": "tvshow | select id from tv_channel group by id having count ( * ) > 2", "gold_parse": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2", "question": "What are the ids of all tv channels that have more than 2 TV channels?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Channel FROM TV_series GROUP BY Channel HAVING Count ( * ) > 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Channel in TV_series table', 'Step 2: find Channel in TV_series table whose corresponding value in step 1 is greater than 2']", "feedback": "Instead of channel , tv series table use TV Channel's id , tv channel table in step 2.", "context": "What are the ids of all tv channels that have more than 2 TV channels? || select channel from tv_series group by channel having count ( * ) > 2 || tvshow | tv_channel : id || Instead of channel, tv series table use TV Channel's id, tv channel table in step 2.", "label": "tvshow | select id from tv_channel group by country having count ( * ) > 2" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs", "gold_parse": "SELECT count(*) FROM Paragraphs", "question": "Count the number of paragraphs.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "Use paragraphs table in place of reference template types table .", "context": "Count the number of paragraphs. || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | paragraphs : || Use paragraphs table in place of reference template types table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs" }, { "prediction": "battle_death | select distinct battle.id, battle.name from ship join battle on ship.lost_in_battle = battle.id where ship.ship_type = 'Brig'", "gold_parse": "SELECT DISTINCT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig'", "question": "What are the different ids and names of the battles that lost any 'Brig' type shipes?", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT DISTINCT id , name FROM ship WHERE ship_type = \"Brig\"", "predicted_parse_explanation": "['find without repetition the id, name of ship table for which ship_type equals Brig']", "feedback": "Need to swap ship table with battle table .", "context": "What are the different ids and names of the battles that lost any 'Brig' type shipes? || select distinct id, name from ship where ship_type = 'Brig' || battle_death | battle : id, name | ship : lost_in_battle, ship_type ( \"Brig\" ) || Need to swap ship table with battle table.", "label": "battle_death | select distinct battle.id, battle.name from battle join ship on battle.id = ship.lost_in_battle where ship.ship_type = 'Brig'" }, { "prediction": "car_1 | select max ( accelerate ), cylinders from cars_data group by cylinders", "gold_parse": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders", "question": "What is the maximum accelerate for different number of cylinders?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Max ( Cylinders ) , Accelerate FROM cars_data GROUP BY Cylinders", "predicted_parse_explanation": "['find each value of Cylinders in cars_data table along with the maximum Cylinders of the corresponding rows to each value']", "feedback": "you need to search for highest accelerate.", "context": "What is the maximum accelerate for different number of cylinders? || select max ( cylinders ), accelerate from cars_data group by cylinders || car_1 | cars_data : accelerate, cylinders || you need to search for highest accelerate.", "label": "car_1 | select max ( accelerate ), cylinders from cars_data group by cylinders" }, { "prediction": "car_1 | select car_makers.id, model_list.maker from car_makers join car_names on car_makers.makeid = car_names.makeid group by car_makers.id having count ( * ) >= 2 intersect select car_makers.id, car_names.makeid from car_makers join model_list on car_makers.model_list = model_list.maker group by car_names.makeid having count ( * ) >= 3", "gold_parse": "SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) >= 2 INTERSECT SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model GROUP BY T1.Id HAVING count(*) > 3", "question": "Which are the car makers which produce at least 2 models and more than 3 car makes? List the id and the maker.", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T2.MakeId , T1.ModelId FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model WHERE T1.Model > = 2 INTERSECT SELECT T2.MakeId , T1.ModelId FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model WHERE T1.Model > 3", "predicted_parse_explanation": "['Step 1: For each row in model_list table, find the corresponding rows in car_names table', \"Step 2: find MakeId, ModelId of the results of step 1 whose model_list's Model greater than or equals 2\", \"Step 3: find MakeId, ModelId of the results of step 1 whose model_list's Model greater than 3\", 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "I want the id, maker and names of car model including car markers table.", "context": "Which are the car makers which produce at least 2 models and more than 3 car makes? List the id and the maker. || select car_names.makeid, model_list.modelid from model_list join car_names on model_list.model = car_names.model where model_list.model > = 2 intersect select car_names.makeid, model_list.modelid from model_list join car_names on model_list.model = car_names.model where model_list.model > 3 || car_1 | car_makers : id, maker | model_list : maker | car_names : makeid || I want the id, maker and names of car model including car markers table.", "label": "car_1 | select car_makers.id, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id having count ( * ) >= 2 intersect select car_makers.id, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.model group by car_makers.id having count ( * ) > 3" }, { "prediction": "dog_kennels | select charge_type, charge_amount from charges", "gold_parse": "SELECT charge_type , charge_amount FROM Charges", "question": "List each charge type and its amount.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.treatment_type_code , T1.charge_amount FROM Charges AS T1 JOIN Treatment_Types AS T2", "predicted_parse_explanation": "['Step 1: For each row in Charges table, find the corresponding rows in Treatment_Types table', 'Step 2: find treatment_type_code, charge_amount of the results of step 1']", "feedback": "Replace treatment type code with charge type .", "context": "List each charge type and its amount. || select treatment_types.treatment_type_code, charges.charge_amount from charges join treatment_types as treatment_types || dog_kennels | charges : charge_type, charge_amount || Replace treatment type code with charge type.", "label": "dog_kennels | select charge_type, charge_amount from charges" }, { "prediction": "tvshow | select pixel_aspect_ratio_par, country from tv_channel where language!= 'english'", "gold_parse": "SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'", "question": "What is the pixel aspect ratio and country of origin for all TV channels that do not use English?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Hight_definition_TV , Country FROM TV_Channel WHERE Language ! = \"English\"", "predicted_parse_explanation": "['find the Hight_definition_TV, Country of TV_Channel table for which Language not equals English']", "feedback": "Rather than hight definition tv , Use pixel aspect ratio par .", "context": "What is the pixel aspect ratio and country of origin for all TV channels that do not use English? || select hight_definition_tv, country from tv_channel where language! = 'English' || tvshow | tv_channel : pixel_aspect_ratio_par, country, language ( \"english\" ) || Rather than hight definition tv, Use pixel aspect ratio par.", "label": "tvshow | select pixel_aspect_ratio_par, country from tv_channel where language!= 'English'" }, { "prediction": "world_1 | select avg ( lifeexpectancy ) from country where region = 'Central Africa'", "gold_parse": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"", "question": "How long is the people\u2019s average life expectancy in Central Africa?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( LifeExpectancy ) FROM country WHERE Continent = \"Central Africa\"", "predicted_parse_explanation": "['find the average LifeExpectancy in country table whose Continent equals Central Africa']", "feedback": "Switch continent with region .", "context": "How long is the people\u2019s average life expectancy in Central Africa? || select avg ( lifeexpectancy ) from country where continent = 'Central Africa' || world_1 | country : lifeexpectancy, region ( \"Central Africa\" ) || Switch continent with region.", "label": "world_1 | select avg ( lifeexpectancy ) from country where region = 'Central Africa'" }, { "prediction": "world_1 | select count ( * ) from countrylanguage where language = 'English' intersect select countrycode from countrylanguage where language = 'Dutch'", "gold_parse": "SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\")", "question": "How many countries speak both English and Dutch?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM countrylanguage AS T1 WHERE T1.Language = \"English\" INTERSECT SELECT T2.Continent FROM country AS T2 JOIN countrylanguage AS T1 ON T2.Code = T1.CountryCode WHERE T1.Language = \"Dutch\"", "predicted_parse_explanation": "['Step 1: find the number of rows in countrylanguage table whose Language equals English', 'Step 2: For each row in country table, find the corresponding rows in countrylanguage table', 'Step 3: find Continent of the results of step 2 whose Language equals Dutch', 'Step 4: show the rows that are in both the results of step 1 and the results of step 3']", "feedback": "Exchange countrylanguage table with country table in step 1 and continent with country table .", "context": "How many countries speak both English and Dutch? || select count ( * ) from countrylanguage where countrylanguage.language = 'English' intersect select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' || world_1 | countrylanguage : countrycode, language ( \"Dutch\" ) || Exchange countrylanguage table with country table in step 1 and continent with country table.", "label": "world_1 | select count ( * ) from ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' )" }, { "prediction": "car_1 | select model from model_list group by model order by count ( distinct model ) desc limit 1", "gold_parse": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1", "question": "What model has the most different versions?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Model FROM model_list GROUP BY Model ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Model in model_list table', 'Step 2: find Model of model_list table with largest value in the results of step 1']", "feedback": "In step 1, you can use table of car names.", "context": "What model has the most different versions? || select model from model_list group by model order by count ( * ) desc limit 1 || car_1 | model_list : model || In step 1, you can use table of car names.", "label": "car_1 | select model from car_names group by model order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1", "question": "What is the code of airport that has the highest number of flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.AirportCode FROM airports AS T1 JOIN flights AS T2 ON T1.AirportCode = T2.SourceAirport ORDER BY T2.FlightNo Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in airports table, find the corresponding rows in flights table', 'Step 2: find AirportCode of the results of step 1 with largest value of FlightNo']", "feedback": "airport code should be present most number of times as source airport or destination airport in flights .", "context": "What is the code of airport that has the highest number of flights? || select airports.airportcode from airports join flights on airports.airportcode = flights.sourceairport order by flights.flightno desc limit 1 || flight_2 | airports : airportcode | flights : sourceairport || airport code should be present most number of times as source airport or destination airport in flights.", "label": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) desc limit 1" }, { "prediction": "course_teach | select teacher.name, count ( * ) from course join teacher on course.teacher_id = teacher.teacher_id group by teacher.name", "gold_parse": "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name", "question": "What are the names of the teachers and how many courses do they teach?", "db_id": "course_teach", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "course", "teacher", "course_arrange" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2 ], "column_name": [ "*", "Course_ID", "Staring_Date", "Course", "Teacher_ID", "Name", "Age", "Hometown", "Course_ID", "Teacher_ID", "Grade" ] }, "db_foreign_keys": { "column_id": [ 9, 8 ], "other_column_id": [ 4, 1 ] }, "predicted_parse_with_values": "SELECT T1.Name , Count ( * ) FROM teacher AS T1 JOIN course_arrange AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Teacher_ID", "predicted_parse_explanation": "['Step 1: For each row in teacher table, find the corresponding rows in course_arrange table', \"Step 2: find each value of course_arrange's Teacher_ID in the results of step 1 along with the number of the corresponding rows to each value\"]", "feedback": "Also need to find teacher's name .", "context": "What are the names of the teachers and how many courses do they teach? || select teacher.name, count ( * ) from teacher join course_arrange on teacher.teacher_id = course_arrange.teacher_id group by course_arrange.teacher_id || course_teach | teacher : name, teacher_id | course : teacher_id || Also need to find teacher's name.", "label": "course_teach | select teacher.name, count ( * ) from course_arrange join teacher on course_arrange.teacher_id = teacher.teacher_id group by teacher.name" }, { "prediction": "tvshow | select title from cartoon where directed_by = 'Ben Jones'", "gold_parse": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\"", "question": "List all cartoon directed by \"Ben Jones\".", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Title FROM Cartoon WHERE Written_by = \"Ben Jones\" AND Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['find Title of Cartoon table whose Written_by equals Ben Jones and Directed_by equals Ben Jones']", "feedback": "Remove written by equals Ben Jones and\".", "context": "List all cartoon directed by \"Ben Jones\". || select title from cartoon where written_by = 'Ben Jones' and directed_by = 'Ben Jones' || tvshow | cartoon : title, directed_by ( \"Ben Jones\" ) || Remove written by equals Ben Jones and\".", "label": "tvshow | select title from cartoon where directed_by = 'Ben Jones'" }, { "prediction": "car_1 | select max ( horsepower ), cylinders, make from cars_data where cylinders = 3", "gold_parse": "SELECT T2.horsepower , T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1", "question": "What is the largest amount of horsepower for the models with 3 cylinders and what make is it?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Max ( Weight ) FROM cars_data WHERE Cylinders = 1", "predicted_parse_explanation": "['find the maximum Weight in cars_data table whose Cylinders equals 1']", "feedback": "Replace weight with horsepower , also find corresponding car names's make , and ensure cylinders equals 3", "context": "What is the largest amount of horsepower for the models with 3 cylinders and what make is it? || select max ( weight ) from cars_data where cylinders = 1 || car_1 | cars_data : horsepower, cylinders ( 3 ), make || Replace weight with horsepower, also find corresponding car names's make, and ensure cylinders equals 3", "label": "car_1 | select cars_data.horsepower, car_names.make from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.cylinders = 3 order by cars_data.horsepower desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select version_number, template_type_code from templates where date_effective_to < 5", "gold_parse": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5", "question": "What is the version number and template type code for the template with version number later than 5?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_Details , Template_Type_Code FROM Templates WHERE Version_Number > 5", "predicted_parse_explanation": "['find the Template_Details, Template_Type_Code of Templates table for which Version_Number greater than 5']", "feedback": "Need to change template details with version number .", "context": "What is the version number and template type code for the template with version number later than 5? || select template_details, template_type_code from templates where version_number > 5 || cre_Doc_Template_Mgt | templates : version_number, template_type_code, date_effective_to ( 5 ) || Need to change template details with version number.", "label": "cre_Doc_Template_Mgt | select version_number, template_type_code from templates where version_number > 5" }, { "prediction": "battle_death | select ship.id, ship.name from ship join death on ship.id = death.caused_by_ship_id group by ship.id order by sum ( death.injured ) desc limit 1", "gold_parse": "SELECT T2.id , T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1", "question": "What is the ship id and name that caused most total injuries?", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT T1.id , T1.name FROM ship AS T1 JOIN death AS T2 ON T1.id = T2.caused_by_ship_id GROUP BY T2.id ORDER BY Sum ( T2.injured ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in ship table, find the corresponding rows in death table', \"Step 2: find the summation of injured of each value of death's id in the results of step 1\", \"Step 3: find ship's id, name of step 1 results with largest value in the results of step 2\"]", "feedback": "use caused by ship id in step 2 instead of id", "context": "What is the ship id and name that caused most total injuries? || select ship.id, ship.name from ship join death on ship.id = death.caused_by_ship_id group by death.id order by sum ( death.injured ) desc limit 1 || battle_death | ship : id, name | death : caused_by_ship_id, injured || use caused by ship id in step 2 instead of id", "label": "battle_death | select ship.id, ship.name from death join ship on death.caused_by_ship_id = ship.id group by ship.id order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select name from country where continent = 'Asia' order by lifeexpectancy asc limit 1", "gold_parse": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1", "question": "Give the name of the country in Asia with the lowest life expectancy.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country ORDER BY LifeExpectancy Asc LIMIT 1", "predicted_parse_explanation": "['find the Name of country table with smallest value of LifeExpectancy']", "feedback": "Verify continent equals Asia .", "context": "Give the name of the country in Asia with the lowest life expectancy. || select name from country order by lifeexpectancy asc limit 1 || world_1 | country : name, continent ( \"Asia\" ), lifeexpectancy || Verify continent equals Asia.", "label": "world_1 | select name from country where continent = 'Asia' order by lifeexpectancy asc limit 1" }, { "prediction": "student_transcripts_tracking | select students.first_name from addresses join students on addresses.address_id = students.permanent_address_id where addresses.country = 'Haiti' or students.cell_mobile_number = '09700166582'", "gold_parse": "SELECT T1.first_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.permanent_address_id = T2.address_id WHERE T2.country = 'Haiti' UNION SELECT first_name FROM Students WHERE cell_mobile_number = '09700166582'", "question": "Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T2.first_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id WHERE T1.country = \"Iceland\" OR T2.cell_mobile_number = \"(096)889-8954x524\" UNION SELECT T2.first_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id WHERE T1.country = 09700166582 OR T2.cell_mobile_number = \"Haiti\"", "predicted_parse_explanation": "['Step 1: For each row in Addresses table, find the corresponding rows in Students table', 'Step 2: find first_name of the results of step 1 whose country equals Iceland or cell_mobile_number equals (096)889-8954x524', 'Step 3: find first_name of the results of step 1 whose country equals 09700166582 or cell_mobile_number equals Haiti', 'Step 4: show the rows that are in any of the results of step 2 or the results of step 3']", "feedback": "Search Students'first name whose cell mobile number equals 09700166582 or country equals Haiti , ensure that student lives permanently there .", "context": "Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582. || select students.first_name from addresses join students on addresses.address_id = students.current_address_id where addresses.country = 'Iceland' or students.cell_mobile_number = '(096)889-8954x524' union select students.first_name from addresses join students on addresses.address_id = students.current_address_id where addresses.country = 09700166582 or students.cell_mobile_number = 'Haiti' || student_transcripts_tracking | students : first_name, permanent_address_id, cell_mobile_number ( \"09700166582\" ) | addresses : address_id, country ( \"Haiti\" ) || Search Students'first name whose cell mobile number equals 09700166582 or country equals Haiti, ensure that student lives permanently there.", "label": "student_transcripts_tracking | select students.first_name from students join addresses on students.permanent_address_id = addresses.address_id where addresses.country = 'Haiti' union select first_name from students where cell_mobile_number = '09700166582'" }, { "prediction": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "question": "Return the number of flights departing from Aberdeen.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE AirportName = \"Aberdeen\"", "predicted_parse_explanation": "['find the number of rows in airports table whose AirportName equals Aberdeen']", "feedback": "i want every single value from flights table of source airport for which aberdeen is city.", "context": "Return the number of flights departing from Aberdeen. || select count ( * ) from airports where airportname = 'Aberdeen' || flight_2 | flights : destairport, airportcode | airports : airportcode, city ( \"Aberdeen\" ) || i want every single value from flights table of source airport for which aberdeen is city.", "label": "flight_2 | select count ( * ) from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'" }, { "prediction": "world_1 | select name, population, headofstate from country order by surfacearea desc limit 1", "gold_parse": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", "question": "Give the name, population, and head of state for the country that has the largest area.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name , Population , Continent FROM country ORDER BY SurfaceArea Desc LIMIT 1", "predicted_parse_explanation": "['find the Name, Population, Continent of country table with largest value of SurfaceArea']", "feedback": "No need to find continent so exchange it with head of state .", "context": "Give the name, population, and head of state for the country that has the largest area. || select name, population, continent from country order by surfacearea desc limit 1 || world_1 | country : name, population, headofstate, surfacearea || No need to find continent so exchange it with head of state.", "label": "world_1 | select name, population, headofstate from country order by surfacearea desc limit 1" }, { "prediction": "dog_kennels | select professionals.first_name, professionals.last_name from professionals join treatments on professionals.professional_id = treatments.professional_id where treatments.cost_of_treatment < ( select avg ( cost_of_treatment ) from treatments )", "gold_parse": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )", "question": "What are the first name and last name of the professionals who have done treatment with cost below average?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.first_name , T2.last_name FROM Charges AS T1 JOIN Professionals AS T2 WHERE T1.charge_amount < ( SELECT Avg ( T1.charge_amount ) FROM Charges AS T1 )", "predicted_parse_explanation": "['Step 1: find the average charge_amount in Charges table', 'Step 2: For each row in Charges table, find the corresponding rows in Professionals table', 'Step 3: find first_name, last_name in the results of step 2 whose charge_amount less than the results of step 1']", "feedback": "Change charge amount in charges with cost of treatment of treatments in step 1 and charge amount with Treatments's cost of treatment in step 3.", "context": "What are the first name and last name of the professionals who have done treatment with cost below average? || select professionals.first_name, professionals.last_name from charges join professionals where charges.charge_amount < ( select avg ( charges.charge_amount ) from charges ) || dog_kennels | professionals : first_name, last_name, professional_id | treatments : professional_id, cost_of_treatment || Change charge amount in charges with cost of treatment of treatments in step 1 and charge amount with Treatments's cost of treatment in step 3.", "label": "dog_kennels | select distinct professionals.first_name, professionals.last_name from professionals join treatments where cost_of_treatment < ( select avg ( cost_of_treatment ) from treatments )" }, { "prediction": "dog_kennels | select owners.first_name, owners.last_name, dogs.size_code from owners join dogs on owners.owner_id = dogs.owner_id", "gold_parse": "SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "question": "List each owner's first name, last name, and the size of his for her dog.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT first_name , last_name , owner_id FROM Owners", "predicted_parse_explanation": "['find the first_name, last_name, owner_id of Owners table']", "feedback": "Replace owner id with corresponding Dogs's size code .", "context": "List each owner's first name, last name, and the size of his for her dog. || select first_name, last_name, owner_id from owners || dog_kennels | owners : first_name, last_name, owner_id | dogs : size_code, owner_id || Replace owner id with corresponding Dogs's size code.", "label": "dog_kennels | select owners.first_name, owners.last_name, dogs.size_code from owners join dogs on owners.owner_id = dogs.owner_id" }, { "prediction": "car_1 | select distinct model_list.model from cars_data join model_list on cars_data.model = model_list.model join car_makers on model_list.maker = car_makers.id where car_makers.fulname = 'Ford Motor Company' and cars_data.weight < 3500", "gold_parse": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company'", "question": "What are the different models wthat are lighter than 3500 but were not built by the Ford Motor Company?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT DISTINCT T1.Model FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T3.Weight > 3500 EXCEPT SELECT T1.Model FROM car_makers AS T4 JOIN model_list AS T1 ON T4.Id = T1.Maker WHERE T4.Maker = \"Ford Motor Company\"", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find without repetition model_list's Model of the results of step 1 whose Weight greater than 3500\", 'Step 3: For each row in car_makers table, find the corresponding rows in model_list table', \"Step 4: find model_list's Model of the results of step 3 whose car_makers's Maker equals Ford Motor Company\", 'Step 5: show the rows that are in the results of step 2 but not in the results of step 4']", "feedback": "i want less in step 2 and full name in step 4.", "context": "What are the different models wthat are lighter than 3500 but were not built by the Ford Motor Company? || select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.weight > 3500 except select model_list.model from car_makers join model_list on car_makers.id = model_list.maker where car_makers.maker = 'Ford Motor Company' || car_1 | model_list : model, maker | cars_data : model, weight ( 3500 ) | car_makers : id, fullname ( \"Ford Motor Company\" ) || i want less in step 2 and full name in step 4.", "label": "car_1 | select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id join car_makers on model_list.maker = car_makers.id where cars_data.weight < 3500 and car_makers.fullname!= 'Ford Motor Company'" }, { "prediction": "tvshow | select country from tv_channel where id not in ( select id from cartoon where written_by = 'Todd Casey' )", "gold_parse": "SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "question": "What are the countries that are not playing cartoons written by Todd Casey?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Michael Jelenic\" EXCEPT SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Todd Casey\" AND T2.Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find Country of the results of step 1 whose Written_by equals Michael Jelenic', 'Step 3: find Country of the results of step 1 whose Written_by equals Todd Casey and Directed_by equals Ben Jones', 'Step 4: show the rows that are in the results of step 2 but not in the results of step 3']", "feedback": "We need to determine the country which is not written by Todd Casey.", "context": "What are the countries that are not playing cartoons written by Todd Casey? || select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Michael Jelenic' except select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey' and cartoon.directed_by = 'Ben Jones' || tvshow | tv_channel : country, id | cartoon : id, written_by ( \"Todd Casey\" ) || We need to determine the country which is not written by Todd Casey.", "label": "tvshow | select country from tv_channel except select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" }, { "prediction": "pets_1 | select fname, age from student where stuid in ( select stuid from has_pet join pets on has_pet.petid = pets.petid where pets.pettype = 'Dog' except select stuid from has_pet join student on has_pet.petid = student.stuid where pets.pettype = 'Cat' )", "gold_parse": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "question": "Find the first name and age of students who have a dog but do not have a cat as a pet.", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT T1.Fname , T1.Age FROM Student AS T1 WHERE T1.StuID NOT IN ( SELECT T2.StuID FROM Has_Pet AS T2 )", "predicted_parse_explanation": "['Step 1: find the StuID of Has_Pet table', \"Step 2: find the Fname, Age of Student table whose Student's StuID not one of the results of step 1\"]", "feedback": "in step 2, the student id should only be dogs.", "context": "Find the first name and age of students who have a dog but do not have a cat as a pet. || select student.fname, student.age from student where student.stuid not in ( select has_pet.stuid from has_pet ) || pets_1 | student : fname, age, stuid | has_pet : stuid, petid | pets : petid, pettype ( \"Cat\" ) || in step 2, the student id should only be dogs.", "label": "pets_1 | select student.fname, student.age from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog' and student.stuid not in ( select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' )" }, { "prediction": "poker_player | select poker_player.money_rank from poker_player join people on poker_player.people_id = people.people_id order by people.height desc limit 1", "gold_parse": "SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1", "question": "Return the money rank of the poker player with the greatest height.", "db_id": "poker_player", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "poker_player", "people" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Poker_Player_ID", "People_ID", "Final_Table_Made", "Best_Finish", "Money_Rank", "Earnings", "People_ID", "Nationality", "Name", "Birth_Date", "Height" ] }, "db_foreign_keys": { "column_id": [ 2 ], "other_column_id": [ 7 ] }, "predicted_parse_with_values": "SELECT T1.Earnings FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in people table, find the corresponding rows in poker_player table', 'Step 2: find Earnings of the results of step 1 with largest value of Height']", "feedback": "Use money rank in place of earnings.", "context": "Return the money rank of the poker player with the greatest height. || select poker_player.earnings from poker_player join people on poker_player.people_id = people.people_id order by people.height desc limit 1 || poker_player | poker_player : money_rank, people_id | people : people_id, height || Use money rank in place of earnings.", "label": "poker_player | select poker_player.money_rank from people join poker_player on people.people_id = poker_player.people_id order by people.height desc limit 1" }, { "prediction": "car_1 | select min ( weight ) from cars_data where cylinders = 8 and year = 1974", "gold_parse": "SELECT Weight FROM CARS_DATA WHERE Cylinders = 4 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1", "question": "What is the smallest weight of the car produced with 8 cylinders on 1974?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Min ( Weight ) FROM cars_data WHERE Year = 1", "predicted_parse_explanation": "['find the minimum Weight in cars_data table whose Year equals 1']", "feedback": "confirm that the year is 1974 and cylinders is 8.", "context": "What is the smallest weight of the car produced with 8 cylinders on 1974? || select min ( weight ) from cars_data where year = 1 || car_1 | cars_data : weight, cylinders ( 8 ), year ( 1974 ) || confirm that the year is 1974 and cylinders is 8.", "label": "car_1 | select weight from cars_data where cylinders = 4 and year = 1974 order by weight asc limit 1" }, { "prediction": "student_transcripts_tracking | select student_enrolment.semester_id from student_enrolment join degree_programs on student_enrolment.student_id = degree_programs.degree_program_id where degree_programs.degree_name = 'Master' intersect select student_enrolment.semester_id from student_enrolment join degree_programs on student_enrolment.student_id = degree_programs.degree_program_id where degree_programs.degree_name = 'Bachelor'", "gold_parse": "SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'", "question": "Find the semester when both Master students and Bachelor students got enrolled in.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT semester_name FROM Semesters WHERE semester_name = \"Master\" INTERSECT SELECT semester_name FROM Semesters WHERE semester_description = \"Bachelor\"", "predicted_parse_explanation": "['Step 1: find the semester_name of Semesters table for which semester_name equals Master', 'Step 2: find the semester_name of Semesters table for which semester_description equals Bachelor', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "You should use degree summary name in place of second semester name and semester description of step 1 and 2 respectively.", "context": "Find the semester when both Master students and Bachelor students got enrolled in. || select semester_name from semesters where semester_name = 'Master' intersect select semester_name from semesters where semester_description = 'Bachelor' || student_transcripts_tracking | student_enrolment : semester_id, student_id | degree_programs : degree_program_id, degree_name ( \"Bachelor\" ) || You should use degree summary name in place of second semester name and semester description of step 1 and 2 respectively.", "label": "student_transcripts_tracking | select distinct student_enrolment.semester_id from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id where degree_summary_name = 'Master' intersect select distinct student_enrolment.semester_id from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id where degree_summary_name = 'Bachelor'" }, { "prediction": "student_transcripts_tracking | select count ( * ) from courses", "gold_parse": "SELECT count(*) FROM Courses", "question": "How many courses are there?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Addresses", "predicted_parse_explanation": "['find the number of rows in Addresses table']", "feedback": "In place of addresses table, search result from courses table.", "context": "How many courses are there? || select count ( * ) from addresses || student_transcripts_tracking | courses : || In place of addresses table, search result from courses table.", "label": "student_transcripts_tracking | select count ( * ) from courses" }, { "prediction": "dog_kennels | select owners.first_name, dogs.name from owners join dogs on owners.owner_id = dogs.owner_id where owners.state = 'Virginia'", "gold_parse": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia'", "question": "Find the first names of owners living in Virginia and the names of dogs they own.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T1.first_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = \"Virginia\" AND T2.name = \"Kacey\"", "predicted_parse_explanation": "['Step 1: For each row in Owners table, find the corresponding rows in Dogs table', 'Step 2: find first_name of the results of step 1 whose state equals Virginia and name equals Kacey']", "feedback": "In step 2 also find name , and remove \"and name equals Kacey\" phrase .", "context": "Find the first names of owners living in Virginia and the names of dogs they own. || select owners.first_name from owners join dogs on owners.owner_id = dogs.owner_id where owners.state = 'Virginia' and dogs.name = 'Kacey' || dog_kennels | owners : first_name, owner_id, state ( \"Virginia\" ) | dogs : name, owner_id || In step 2 also find name, and remove \"and name equals Kacey\" phrase.", "label": "dog_kennels | select owners.first_name, dogs.name from owners join dogs on owners.owner_id = dogs.owner_id where owners.state = 'Virginia'" }, { "prediction": "concert_singer | select name, country, age from singer order by age desc", "gold_parse": "SELECT name , country , age FROM singer ORDER BY age DESC", "question": "Show name, country, age for all singers ordered by age from the oldest to the youngest.", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Name , Country , Age FROM singer ORDER BY Age Asc", "predicted_parse_explanation": "['find the Name, Country, Age of singer table ordered ascending by Age']", "feedback": "You have to interchange ascending with descending.", "context": "Show name, country, age for all singers ordered by age from the oldest to the youngest. || select name, country, age from singer order by age asc || concert_singer | singer : name, country, age || You have to interchange ascending with descending.", "label": "concert_singer | select name, country, age from singer order by age desc" }, { "prediction": "wta_1 | select count ( * ) from matches", "gold_parse": "SELECT count(*) FROM matches", "question": "Find the total number of matches.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM players", "predicted_parse_explanation": "['find the number of rows in players table']", "feedback": "Players table can be replace by matches table.", "context": "Find the total number of matches. || select count ( * ) from players || wta_1 | matches : || Players table can be replace by matches table.", "label": "wta_1 | select count ( * ) from matches" }, { "prediction": "car_1 | select countries.countryid, countries.countryname from countries join car_makers on countries.countryid = car_makers.id join model_list on countries.countryid = model_list.modelid where car_makers.maker = 'fiat' group by countries.countryid having count ( * ) > 3", "gold_parse": "SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING count(*) > 3 UNION SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WHERE T3.Model = 'fiat'", "question": "What are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT CountryId , CountryName FROM countries GROUP BY CountryId HAVING Count ( * ) > \"fiat\" UNION SELECT CountryId , CountryName FROM countries GROUP BY CountryId HAVING Count ( * ) > 3", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of CountryId in countries table', 'Step 2: find CountryId, CountryName in countries table whose corresponding value in step 1 is greater than fiat', 'Step 3: find CountryId, CountryName in countries table whose corresponding value in step 1 is greater than 3', 'Step 4: show the rows that are in any of the results of step 2 or the results of step 4']", "feedback": "In step 1 car makers's model id , in step 2 needs model equals fiat , step 4 with step 3 in step 4.", "context": "What are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model? || select countryid, countryname from countries group by countryid having count ( * ) > 'fiat' union select countryid, countryname from countries group by countryid having count ( * ) > 3 || car_1 | countries : countryid, countryname | car_makers : id, maker ( \"fiat\" ) | model_list : modelid || In step 1 car makers's model id, in step 2 needs model equals fiat, step 4 with step 3 in step 4.", "label": "car_1 | select countries.countryid, countries.countryname from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) > 3 union select countries.countryid, countries.countryname from countries join car_makers on countries.countryid = car_makers.country join model_list on car_makers.id = model_list.maker where model_list.model = 'fiat'" }, { "prediction": "orchestra | select name from conductor order by year_of_work desc limit 1", "gold_parse": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1", "question": "List the name of the conductor with the most years of work.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID ORDER BY T2.Year_of_Founded Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in conductor table, find the corresponding rows in orchestra table', 'Step 2: find Name of the results of step 1 with largest value of Year_of_Founded']", "feedback": "You need to look for working year.", "context": "List the name of the conductor with the most years of work. || select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id order by orchestra.year_of_founded desc limit 1 || orchestra | conductor : name, year_of_work || You need to look for working year.", "label": "orchestra | select name from conductor order by year_of_work desc limit 1" }, { "prediction": "orchestra | select conductor.name, orchestra.orchestre from conductor join orchestra on conductor.director_id = orchestra.director_id", "gold_parse": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", "question": "What are the names of conductors as well as the corresonding orchestras that they have conducted?", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT Name FROM conductor", "predicted_parse_explanation": "['find the Name of conductor table']", "feedback": "And from orchestra table, I want relative orchestra.", "context": "What are the names of conductors as well as the corresonding orchestras that they have conducted? || select name from conductor || orchestra | conductor : name, conductor_id | orchestra : orchestra, conductor_id || And from orchestra table, I want relative orchestra.", "label": "orchestra | select conductor.name, orchestra.orchestra from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id" }, { "prediction": "cre_Doc_Template_Mgt | select document_id from paragraphs group by document_id having count ( * ) >= 2", "gold_parse": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", "question": "List all document ids with at least two paragraphs.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_ID FROM Documents GROUP BY Template_ID HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Template_ID in Documents table', 'Step 2: find Template_ID in Documents table whose corresponding value in step 1 is greater than or equals 2']", "feedback": "Replace template id , documents table with document id , paragraphs table In step 1 and template id with document id in Step 2.", "context": "List all document ids with at least two paragraphs. || select template_id from documents group by template_id having count ( * ) > = 2 || cre_Doc_Template_Mgt | paragraphs : document_id || Replace template id, documents table with document id, paragraphs table In step 1 and template id with document id in Step 2.", "label": "cre_Doc_Template_Mgt | select document_id from paragraphs group by document_id having count ( * ) >= 2" }, { "prediction": "flight_2 | select airportname from airports except select airports.airportname from airports join flights on airports.airportcode = flights.sourceairport or flights.destinationairport", "gold_parse": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)", "question": "Find the name of airports which do not have any flight in and out.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT AirportName FROM airports EXCEPT SELECT AirportName FROM airports", "predicted_parse_explanation": "['Step 1: find the AirportName of airports table', 'Step 2: find the AirportName of airports table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "obtain the value whose airport code is in either source airport or destination airport in step 2.", "context": "Find the name of airports which do not have any flight in and out. || select airportname from airports except select airportname from airports || flight_2 | airports : airportname, airportcode | flights : sourceairport, destinationairport || obtain the value whose airport code is in either source airport or destination airport in step 2.", "label": "flight_2 | select airportname from airports where airportcode not in ( select sourceairport from flights union select destairport from flights )" }, { "prediction": "flight_2 | select count ( * ) from airlines join flights on airlines.uid = flights.airport where airlines.airport = 'JetBlue Airways'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", "question": "Give the number of Jetblue Airways flights.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines WHERE Airline = \"JetBlue Airways\"", "predicted_parse_explanation": "['find the number of rows in airlines table whose Airline equals JetBlue Airways']", "feedback": "Replace airlines table with flights table , ensure airlines's airline equals JetBlue Airways .", "context": "Give the number of Jetblue Airways flights. || select count ( * ) from airlines where airline = 'JetBlue Airways' || flight_2 | airlines : uid, airline ( \"JetBlue Airways\" ) | flights : airline || Replace airlines table with flights table, ensure airlines's airline equals JetBlue Airways.", "label": "flight_2 | select count ( * ) from flights join airlines on flights.airline = airlines.uid where airlines.airline = 'JetBlue Airways'" }, { "prediction": "student_transcripts_tracking | select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id", "gold_parse": "SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id", "question": "What are the names of all courses that have some students enrolled?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name FROM Courses", "predicted_parse_explanation": "['find the course_name of Courses table']", "feedback": "Ensure that course id of courses table present in course id of student enrolment courses table .", "context": "What are the names of all courses that have some students enrolled? || select course_name from courses || student_transcripts_tracking | courses : course_name, course_id | student_enrolment_courses : course_id || Ensure that course id of courses table present in course id of student enrolment courses table.", "label": "student_transcripts_tracking | select distinct courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id" }, { "prediction": "course_teach | select name from teacher where teacher_id not in ( select teacher_id from course_arrange )", "gold_parse": "SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)", "question": "What are the names of the teachers whose courses have not been arranged?", "db_id": "course_teach", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "course", "teacher", "course_arrange" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2 ], "column_name": [ "*", "Course_ID", "Staring_Date", "Course", "Teacher_ID", "Name", "Age", "Hometown", "Course_ID", "Teacher_ID", "Grade" ] }, "db_foreign_keys": { "column_id": [ 9, 8 ], "other_column_id": [ 4, 1 ] }, "predicted_parse_with_values": "SELECT Name FROM teacher EXCEPT SELECT Name FROM teacher", "predicted_parse_explanation": "['Step 1: find the Name of teacher table', 'Step 2: find the Name of teacher table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "Look for name of teacher whose id is part of course arrange table in 2nd step.", "context": "What are the names of the teachers whose courses have not been arranged? || select name from teacher except select name from teacher || course_teach | teacher : name, teacher_id | course_arrange : teacher_id || Look for name of teacher whose id is part of course arrange table in 2nd step.", "label": "course_teach | select name from teacher where teacher_id not in ( select teacher_id from course_arrange )" }, { "prediction": "flight_2 | select count ( * ) from airports", "gold_parse": "SELECT count(*) FROM AIRPORTS", "question": "How many airports do we have?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines", "predicted_parse_explanation": "['find the number of rows in airlines table']", "feedback": "Airlines table should be used in place of airports table.", "context": "How many airports do we have? || select count ( * ) from airlines || flight_2 | airports : || Airlines table should be used in place of airports table.", "label": "flight_2 | select count ( * ) from airports" }, { "prediction": "cre_Doc_Template_Mgt | select distinct ref_template_types.template_type_description from ref_template_types join templates on ref_template_types.template_type_code = documents.template_id", "gold_parse": "SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID", "question": "What are the distinct template type descriptions for the templates ever used by any document?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT DISTINCT Template_Type_Description FROM Ref_Template_Types", "predicted_parse_explanation": "['find without repetition the Template_Type_Description of Ref_Template_Types table']", "feedback": "Ensure that template is used in a Document .", "context": "What are the distinct template type descriptions for the templates ever used by any document? || select distinct template_type_description from ref_template_types || cre_Doc_Template_Mgt | ref_template_types : template_type_description, template_type_code | templates : template_id | documents : template_id || Ensure that template is used in a Document.", "label": "cre_Doc_Template_Mgt | select distinct ref_template_types.template_type_description from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code join documents on templates.template_id = documents.template_id" }, { "prediction": "student_transcripts_tracking | select distinct addresses.address_id from addresses join students on addresses.address_id = students.current_address_id", "gold_parse": "SELECT count(DISTINCT current_address_id) FROM Students", "question": "What are the different addresses that have students living there?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT DISTINCT email_address FROM Students", "predicted_parse_explanation": "['find without repetition the email_address of Students table']", "feedback": "Exchange email address with current address id .", "context": "What are the different addresses that have students living there? || select distinct email_address from students || student_transcripts_tracking | addresses : address_id | students : current_address_id || Exchange email address with current address id.", "label": "student_transcripts_tracking | select count ( distinct current_address_id ) from students" }, { "prediction": "tvshow | select package_option from tv_channel where id not in ( select id from cartoon where directed_by = 'Ben Jones' )", "gold_parse": "SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')", "question": "find the package option of the tv channel that do not have any cartoon directed by Ben Jones.", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Package_Option FROM TV_Channel AS T1 EXCEPT SELECT T1.Package_Option FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: find the Package_Option of TV_Channel table', 'Step 2: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 3: find Package_Option of the results of step 2 whose Written_by equals Ben Jones', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "For step 3, You should use directed by and omit written by.", "context": "find the package option of the tv channel that do not have any cartoon directed by Ben Jones. || select tv_channel.package_option from tv_channel except select tv_channel.package_option from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Ben Jones' || tvshow | tv_channel : package_option, id | cartoon : id, directed_by ( \"Ben Jones\" ) || For step 3, You should use directed by and omit written by.", "label": "tvshow | select package_option from tv_channel where id not in ( select channel from cartoon where directed_by = 'Ben Jones' )" }, { "prediction": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba'", "gold_parse": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\" ORDER BY Percentage DESC LIMIT 1", "question": "What language is predominantly spoken in Aruba?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country WHERE Continent = \"Aruba\"", "predicted_parse_explanation": "['find the Name of country table for which Continent equals Aruba']", "feedback": "Find language of countrylanguage for which is official is T and corresponding country's name name equals Aruba .", "context": "What language is predominantly spoken in Aruba? || select name from country where continent = 'Aruba' || world_1 | countrylanguage : language, countrycode | country : code, name ( \"Aruba\" ) || Find language of countrylanguage for which is official is T and corresponding country's name name equals Aruba.", "label": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba' order by percentage desc limit 1" }, { "prediction": "real_estate_properties | select count ( * ) from other_available_features", "gold_parse": "SELECT count(*) FROM Other_Available_Features", "question": "How many available features are there in total?", "db_id": "real_estate_properties", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Feature_Types", "Ref_Property_Types", "Other_Available_Features", "Properties", "Other_Property_Features" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4 ], "column_name": [ "*", "feature_type_code", "feature_type_name", "property_type_code", "property_type_description", "feature_id", "feature_type_code", "feature_name", "feature_description", "property_id", "property_type_code", "date_on_market", "date_sold", "property_name", "property_address", "room_count", "vendor_requested_price", "buyer_offered_price", "agreed_selling_price", "apt_feature_1", "apt_feature_2", "apt_feature_3", "fld_feature_1", "fld_feature_2", "fld_feature_3", "hse_feature_1", "hse_feature_2", "hse_feature_3", "oth_feature_1", "oth_feature_2", "oth_feature_3", "shp_feature_1", "shp_feature_2", "shp_feature_3", "other_property_details", "property_id", "feature_id", "property_feature_description" ] }, "db_foreign_keys": { "column_id": [ 6, 10, 35, 36 ], "other_column_id": [ 1, 3, 9, 5 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Feature_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Feature_Types table']", "feedback": "feature not feature types", "context": "How many available features are there in total? || select count ( * ) from ref_feature_types || real_estate_properties | other_available_features : || feature not feature types", "label": "real_estate_properties | select count ( * ) from other_available_features" }, { "prediction": "wta_1 | select country_code from players group by country_code having count ( * ) > 50", "gold_parse": "SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50", "question": "What are the codes of countries with more than 50 players?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT country_code FROM players WHERE player_id > 50", "predicted_parse_explanation": "['find the country_code of players table for which player_id greater than 50']", "feedback": "You should identify the value of each player's country code with number that corresponds to the value of rows.", "context": "What are the codes of countries with more than 50 players? || select country_code from players where player_id > 50 || wta_1 | players : country_code || You should identify the value of each player's country code with number that corresponds to the value of rows.", "label": "wta_1 | select country_code from players group by country_code having count ( * ) > 50" }, { "prediction": "wta_1 | select loser_rank from matches", "gold_parse": "SELECT min(loser_rank) FROM matches", "question": "What is the best rank of losers across all matches?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT loser_rank FROM matches", "predicted_parse_explanation": "['find the loser_rank of matches table']", "feedback": "Provide me the rank of loser repeating frequently.", "context": "What is the best rank of losers across all matches? || select loser_rank from matches || wta_1 | matches : loser_rank || Provide me the rank of loser repeating frequently.", "label": "wta_1 | select min ( loser_rank ) from matches" }, { "prediction": "cre_Doc_Template_Mgt | select other_details from paragraphs where paragraph_text like '%Korea%'", "gold_parse": "SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea'", "question": "What are the details for the paragraph that includes the text 'Korea'?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T2.Other_Details FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.Document_ID = T2.Document_ID WHERE T1.Document_Name LIKE \"Korea\"", "predicted_parse_explanation": "['Step 1: For each row in Documents table, find the corresponding rows in Paragraphs table', \"Step 2: find Paragraphs's Other_Details of the results of step 1 whose Document_Name contains Korea\"]", "feedback": "Use paragraph text in step 2 and omit name of document.", "context": "What are the details for the paragraph that includes the text 'Korea'? || select paragraphs.other_details from documents join paragraphs on documents.document_id = paragraphs.document_id where documents.document_name like 'Korea' || cre_Doc_Template_Mgt | paragraphs : other_details, paragraph_text ( \"%Korea%\" ) || Use paragraph text in step 2 and omit name of document.", "label": "cre_Doc_Template_Mgt | select other_details from paragraphs where paragraph_text = 'Korea'" }, { "prediction": "student_transcripts_tracking | select courses.course_name, courses.course_id from courses join sections on courses.course_id = sections.course_id group by courses.course_name having count ( * ) <= 2", "gold_parse": "SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2", "question": "What are the names and id of courses having at most 2 sections?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name , course_id FROM Courses GROUP BY course_id HAVING Count ( * ) < = 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of course_id in Courses table', 'Step 2: find course_name, course_id in Courses table whose corresponding value in step 1 is less than or equals 2']", "feedback": "In step 1 exchange courses with sections .", "context": "What are the names and id of courses having at most 2 sections? || select course_name, course_id from courses group by course_id having count ( * ) < = 2 || student_transcripts_tracking | courses : course_name, course_id | sections : course_id || In step 1 exchange courses with sections.", "label": "student_transcripts_tracking | select courses.course_name, courses.course_id from courses join sections on courses.course_id = sections.course_id group by courses.course_id having count ( * ) <= 2" }, { "prediction": "dog_kennels | select charge_type, charge_amount from charges order by charge_amount desc limit 1", "gold_parse": "SELECT max(charge_amount) FROM Charges", "question": "How much does the most expensive charge type costs?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T1.treatment_type_code FROM Treatment_Types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T2.treatment_type_code ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Treatment_Types table, find the corresponding rows in Treatments table', \"Step 2: find the number of rows of each value of Treatments's treatment_type_code in the results of step 1\", \"Step 3: find Treatment_Types's treatment_type_code of step 1 results with largest value in the results of step 2\"]", "feedback": "Find charge type of charges table with largest value of charge amount .", "context": "How much does the most expensive charge type costs? || select treatment_types.treatment_type_code from treatment_types join treatments on treatment_types.treatment_type_code = treatments.treatment_type_code group by treatments.treatment_type_code order by count ( * ) desc limit 1 || dog_kennels | charges : charge_type, charge_amount || Find charge type of charges table with largest value of charge amount.", "label": "dog_kennels | select max ( charge_amount ) from charges" }, { "prediction": "car_1 | select max ( mpg ) from cars_data where cylinders = 8 or year < 1980", "gold_parse": "SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1", "question": "What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Max ( Accelerate ) FROM cars_data WHERE Cylinders = 1 OR Year < 8", "predicted_parse_explanation": "['find the maximum Accelerate in cars_data table whose Cylinders equals 1 or Year less than 8']", "feedback": "confirm that the cylinders is 8 or year is smaller than 1980 and substitute accelerate with mpg.", "context": "What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980? || select max ( accelerate ) from cars_data where cylinders = 1 or year < 8 || car_1 | cars_data : mpg, cylinders ( 8 ), year ( 1980 ) || confirm that the cylinders is 8 or year is smaller than 1980 and substitute accelerate with mpg.", "label": "car_1 | select mpg from cars_data where cylinders = 8 or year < 1980 order by mpg desc limit 1" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.student_id join likes on friend.friend_id = likes.student_id intersect select highschooler.name from highschooler join friend on highschooler.id = friend.student_id join likes on friend.friend_id = likes.student_id", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", "question": "Show name of all students who have some friends and also are liked by someone else.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler INTERSECT SELECT name FROM Highschooler", "predicted_parse_explanation": "['Step 1: find the name of Highschooler table', 'Step 2: find the name of Highschooler table', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "In step 1 ensure corresponding student id present in friend , in step 2 corresponding student id present in likes .", "context": "Show name of all students who have some friends and also are liked by someone else. || select name from highschooler intersect select name from highschooler || network_1 | highschooler : name, id | friend : student_id, friend_id | likes : student_id || In step 1 ensure corresponding student id present in friend, in step 2 corresponding student id present in likes.", "label": "network_1 | select highschooler.name from friend join highschooler on likes.student_id = highschooler.id intersect select highschooler.name from likes join highschooler on likes.liked_id = highschooler.id" }, { "prediction": "tvshow | select count ( distinct series_name ), count ( distinct content ) from tv_channel", "gold_parse": "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel", "question": "How many different series and contents are listed in the TV Channel table?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Episode ) , Count ( * ) FROM TV_series", "predicted_parse_explanation": "['find the number of different Episode and the number of rows in TV_series table']", "feedback": "You need to search different name of series and content in tv channel table.", "context": "How many different series and contents are listed in the TV Channel table? || select count ( distinct episode ), count ( * ) from tv_series || tvshow | tv_channel : series_name, content || You need to search different name of series and content in tv channel table.", "label": "tvshow | select count ( distinct series_name ), count ( distinct content ) from tv_channel" }, { "prediction": "world_1 | select region, population from country where name = 'Angola'", "gold_parse": "SELECT Population , Region FROM country WHERE Name = \"Angola\"", "question": "What are the region and population of Angola?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT SurfaceArea , Population FROM country", "predicted_parse_explanation": "['find the SurfaceArea, Population of country table']", "feedback": "Substitute surface area with region and specify that Country's name name equals Angola .", "context": "What are the region and population of Angola? || select surfacearea, population from country || world_1 | country : region, population, name ( \"Angola\" ) || Substitute surface area with region and specify that Country's name name equals Angola.", "label": "world_1 | select population, region from country where name = 'Angola'" }, { "prediction": "concert_singer | select count ( * ) from singer", "gold_parse": "SELECT count(*) FROM singer", "question": "How many singers do we have?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM stadium", "predicted_parse_explanation": "['find the number of rows in stadium table']", "feedback": "Replace stadium table with singer table .", "context": "How many singers do we have? || select count ( * ) from stadium || concert_singer | singer : || Replace stadium table with singer table.", "label": "concert_singer | select count ( * ) from singer" }, { "prediction": "car_1 | select count ( * ) from car_makers where country = 'usa'", "gold_parse": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa'", "question": "How many car models are produced in the usa?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM car_makers WHERE Country = \"usa\"", "predicted_parse_explanation": "['find the number of rows in car_makers table whose Country equals usa']", "feedback": "you should use country name in place of country.", "context": "How many car models are produced in the usa? || select count ( * ) from car_makers where country = 'usa' || car_1 | car_makers : country ( \"usa\" ) || you should use country name in place of country.", "label": "car_1 | select count ( * ) from model_list join car_makers on model_list.maker = car_makers.id join countries on car_makers.country = countries.countryid where countries.countryname = 'usa'" }, { "prediction": "world_1 | select sum ( population ) from country where countrycode not in ( select countrycode from countrylanguage where language = 'english' )", "gold_parse": "SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\")", "question": "What is the total number of people living in the nations that do not use English?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Sum ( Population ) FROM country WHERE Continent ! = \"English\"", "predicted_parse_explanation": "['find the summation of Population in country table whose Continent not equals English']", "feedback": "The \"Continent\" is wrong , Use countrylanguage's language instead .", "context": "What is the total number of people living in the nations that do not use English? || select sum ( population ) from country where continent! = 'English' || world_1 | country : population, code | countrylanguage : countrycode, language ( \"english\" ) || The \"Continent\" is wrong, Use countrylanguage's language instead.", "label": "world_1 | select sum ( population ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' )" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT'", "gold_parse": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'", "question": "How many documents are using the template with type code 'PPT'?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Templates WHERE Template_Type_Code = \"PPT\"", "predicted_parse_explanation": "['find the number of rows in Templates table whose Template_Type_Code equals PPT']", "feedback": "templates table is wrong . Use documents table in place of it .", "context": "How many documents are using the template with type code 'PPT'? || select count ( * ) from templates where template_type_code = 'PPT' || cre_Doc_Template_Mgt | documents : template_id | templates : template_id, template_type_code ( \"PPT\" ) || templates table is wrong. Use documents table in place of it.", "label": "cre_Doc_Template_Mgt | select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT'" }, { "prediction": "pets_1 | select stuid from student except select stuid from has_pet join pets on has_pet.petid = pets.petid where pets.pettype = 'Cat'", "gold_parse": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'", "question": "What are the ids of the students who do not own cats as pets?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT T1.StuID FROM Student AS T1 EXCEPT SELECT T2.StuID FROM Has_Pet AS T2", "predicted_parse_explanation": "['Step 1: find the StuID of Student table', 'Step 2: find the StuID of Has_Pet table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "in step 2, verify cat is the value of pet type.", "context": "What are the ids of the students who do not own cats as pets? || select student.stuid from student except select has_pet.stuid from has_pet as has_pet || pets_1 | student : stuid | has_pet : stuid, petid | pets : petid, pettype ( \"Cat\" ) || in step 2, verify cat is the value of pet type.", "label": "pets_1 | select stuid from student except select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat'" }, { "prediction": "flight_2 | select count ( distinct airport ) from flights where airportcode = 'ATO'", "gold_parse": "SELECT count(*) FROM FLIGHTS WHERE DestAirport = \"ATO\"", "question": "Count the number of flights into ATO.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines", "predicted_parse_explanation": "['find the number of rows in airlines table']", "feedback": "Swap airlines table with flights table and find only for which destination airport equals ATO .", "context": "Count the number of flights into ATO. || select count ( * ) from airlines || flight_2 | flights : airport, airportcode ( \"ATO\" ) || Swap airlines table with flights table and find only for which destination airport equals ATO.", "label": "flight_2 | select count ( * ) from flights where destairport = 'ATO'" }, { "prediction": "cre_Doc_Template_Mgt | select other_details from paragraphs where paragraph_text = 'Korea'", "gold_parse": "SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea'", "question": "Show paragraph details for paragraph with text 'Korea'.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T2.Other_Details FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.Document_ID = T2.Document_ID WHERE T1.Document_Name = \"Korea\"", "predicted_parse_explanation": "['Step 1: For each row in Documents table, find the corresponding rows in Paragraphs table', \"Step 2: find Paragraphs's Other_Details of the results of step 1 whose Document_Name equals Korea\"]", "feedback": "Search for korea paragraph text in paragraphs table.", "context": "Show paragraph details for paragraph with text 'Korea'. || select paragraphs.other_details from documents join paragraphs on documents.document_id = paragraphs.document_id where documents.document_name = 'Korea' || cre_Doc_Template_Mgt | paragraphs : other_details, paragraph_text ( \"Korea\" ) || Search for korea paragraph text in paragraphs table.", "label": "cre_Doc_Template_Mgt | select other_details from paragraphs where paragraph_text = 'Korea'" }, { "prediction": "cre_Doc_Template_Mgt | select template_id, version_number, template_type_code from templates", "gold_parse": "SELECT template_id , version_number , template_type_code FROM Templates", "question": "Show template ids, version numbers, and template type codes for all templates.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_ID , Version_Number , Template_Type_Code , Template_Type_Code FROM Templates", "predicted_parse_explanation": "['find the Template_ID, Version_Number, Template_Type_Code, Template_Type_Code of Templates table']", "feedback": "You should omit the extra template type code.", "context": "Show template ids, version numbers, and template type codes for all templates. || select template_id, version_number, template_type_code, template_type_code from templates || cre_Doc_Template_Mgt | templates : template_id, version_number, template_type_code || You should omit the extra template type code.", "label": "cre_Doc_Template_Mgt | select template_id, version_number, template_type_code from templates" }, { "prediction": "cre_Doc_Template_Mgt | select other_details from paragraphs where paragraph_text like '%Korea%'", "gold_parse": "SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea'", "question": "What are the details for the paragraph that includes the text 'Korea'?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T2.Other_Details FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.Document_ID = T2.Document_ID WHERE T1.Document_Name LIKE \"Korea\"", "predicted_parse_explanation": "['Step 1: For each row in Documents table, find the corresponding rows in Paragraphs table', \"Step 2: find Paragraphs's Other_Details of the results of step 1 whose Document_Name contains Korea\"]", "feedback": "Change document name with paragraph text in step 2.", "context": "What are the details for the paragraph that includes the text 'Korea'? || select paragraphs.other_details from documents join paragraphs on documents.document_id = paragraphs.document_id where documents.document_name like 'Korea' || cre_Doc_Template_Mgt | paragraphs : other_details, paragraph_text ( \"%Korea%\" ) || Change document name with paragraph text in step 2.", "label": "cre_Doc_Template_Mgt | select other_details from paragraphs where paragraph_text = 'Korea'" }, { "prediction": "network_1 | select count ( * ), student_id from likes group by student_id", "gold_parse": "SELECT student_id , count(*) FROM Likes GROUP BY student_id", "question": "Count the number of likes for each student id.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , student_id FROM Friend GROUP BY student_id", "predicted_parse_explanation": "['find each value of student_id in Friend table along with the number of the corresponding rows to each value']", "feedback": "You should use table.", "context": "Count the number of likes for each student id. || select count ( * ), student_id from friend group by student_id || network_1 | likes : student_id || You should use table.", "label": "network_1 | select student_id, count ( * ) from likes group by student_id" }, { "prediction": "car_1 | select countryname from countries except select countries.countryname from countries join car_makers on countries.countryid = car_makers.country", "gold_parse": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country", "question": "What are the name of the countries where there is not a single car maker?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T1.CountryName FROM countries AS T1 EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN car_makers AS T2 ON T1.CountryId = T2.Country JOIN model_list AS T3 ON T2.Id = T3.Maker WHERE T3.Model = \"amc\"", "predicted_parse_explanation": "['Step 1: find the CountryName of countries table', 'Step 2: For each row in car_makers table, find corresponding rows in countries table and in model_list table', 'Step 3: find CountryName of the results of step 2 whose Model equals amc', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "In step 3 find country name whose country is enlisted in car makers table .", "context": "What are the name of the countries where there is not a single car maker? || select countries.countryname from countries except select countries.countryname from countries join car_makers on countries.countryid = car_makers.country join model_list on car_makers.id = model_list.maker where model_list.model = 'amc' || car_1 | countries : countryname, countryid | car_makers : country || In step 3 find country name whose country is enlisted in car makers table.", "label": "car_1 | select countryname from countries except select countries.countryname from countries join car_makers on countries.countryid = car_makers.country" }, { "prediction": "car_1 | select min ( weight ) from cars_data where cylinders = 8 and year = 1974", "gold_parse": "SELECT Weight FROM CARS_DATA WHERE Cylinders = 4 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1", "question": "What is the minimu weight of the car with 8 cylinders produced in 1974?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Min ( Weight ) FROM cars_data WHERE Year = 1", "predicted_parse_explanation": "['find the minimum Weight in cars_data table whose Year equals 1']", "feedback": "Ensure year equals 1974 and cylinders equals 8.", "context": "What is the minimu weight of the car with 8 cylinders produced in 1974? || select min ( weight ) from cars_data where year = 1 || car_1 | cars_data : weight, cylinders ( 8 ), year ( 1974 ) || Ensure year equals 1974 and cylinders equals 8.", "label": "car_1 | select weight from cars_data where cylinders = 4 and year = 1974 order by weight asc limit 1" }, { "prediction": "flight_2 | select count ( * ) from airports", "gold_parse": "SELECT count(*) FROM AIRPORTS", "question": "Return the number of airports.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines", "predicted_parse_explanation": "['find the number of rows in airlines table']", "feedback": "Find number of rows in airport table .", "context": "Return the number of airports. || select count ( * ) from airlines || flight_2 | airports : || Find number of rows in airport table.", "label": "flight_2 | select count ( * ) from airports" }, { "prediction": "tvshow | select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.id where cartoon.written_by = 'Todd Casey'", "gold_parse": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "question": "What are the countries that have cartoons on TV that were written by Todd Casey?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Todd Casey\" AND T2.Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find Country of the results of step 1 whose Written_by equals Todd Casey and Directed_by equals Ben Jones']", "feedback": "Skip \" and directed by as Ben Jones \".", "context": "What are the countries that have cartoons on TV that were written by Todd Casey? || select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey' and cartoon.directed_by = 'Ben Jones' || tvshow | tv_channel : country, id | cartoon : id, written_by ( \"Todd Casey\" ) || Skip \" and directed by as Ben Jones \".", "label": "tvshow | select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" }, { "prediction": "world_1 | select sum ( population ) from country where countrycode not in ( select countrycode from countrylanguage where language = 'english' )", "gold_parse": "SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\")", "question": "How many people live in countries that do not speak English?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Population FROM country AS T1 WHERE T1.Continent NOT IN ( SELECT T2.CountryCode FROM countrylanguage AS T2 WHERE T2.Language = \"English\" )", "predicted_parse_explanation": "['Step 1: find the CountryCode of countrylanguage table for which Language equals English', 'Step 2: find the Population of country table whose Continent not one of the results of step 1']", "feedback": "Find the summation of population whose language is not equals English .", "context": "How many people live in countries that do not speak English? || select country.population from country where country.continent not in ( select countrylanguage.countrycode from countrylanguage where countrylanguage.language = 'English' ) || world_1 | country : population, countrycode | countrylanguage : countrycode, language ( \"english\" ) || Find the summation of population whose language is not equals English.", "label": "world_1 | select sum ( population ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' )" }, { "prediction": "flight_2 | select count ( * ) from airports join flights on airports.city = flights.sourceairport where airports.city = 'Aberdeen'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "question": "How many flights arriving in Aberdeen city?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE City = \"Aberdeen\"", "predicted_parse_explanation": "['find the number of rows in airports table whose City equals Aberdeen']", "feedback": "make sure that destination airport code is equal to aberdeen and use flights.", "context": "How many flights arriving in Aberdeen city? || select count ( * ) from airports where city = 'Aberdeen' || flight_2 | airports : city ( \"Aberdeen\" ) | flights : sourceairport || make sure that destination airport code is equal to aberdeen and use flights.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen'" }, { "prediction": "dog_kennels | select professionals.first_name, professionals.last_name, professionals.cell_number from professionals join treatments on professionals.professional_id = treatments.professional_id where professionals.state = 'Indiana' group by professionals.professional_id having count ( * ) >= 2", "gold_parse": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2", "question": "Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT professional_id , last_name , home_phone FROM Professionals WHERE state = \"Indiana\" UNION SELECT professional_id , last_name , home_phone FROM Professionals GROUP BY professional_id HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: find the professional_id, last_name, home_phone of Professionals table for which state equals Indiana', 'Step 2: find the number of rows of each value of professional_id in Professionals table', 'Step 3: find professional_id, last_name, home_phone in Professionals table whose corresponding value in step 2 is greater than or equals 2', 'Step 4: show the rows that are in any of the results of step 1 or the results of step 3']", "feedback": "Exchange home phone with cell number in both step 1 and 3 and professionals table with treatments table in step 2.", "context": "Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone. || select professional_id, last_name, home_phone from professionals where state = 'Indiana' union select professional_id, last_name, home_phone from professionals group by professional_id having count ( * ) > = 2 || dog_kennels | professionals : first_name, last_name, cell_number, professional_id, state ( \"Indiana\" ) | treatments : professional_id || Exchange home phone with cell number in both step 1 and 3 and professionals table with treatments table in step 2.", "label": "dog_kennels | select professional_id, last_name, cell_number from professionals where state = 'Indiana' union select professionals.professional_id, professionals.last_name, professionals.cell_number from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) > 2" }, { "prediction": "dog_kennels | select professionals.professional_id, professionals.role_code, professionals.first_name from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) >= 2", "gold_parse": "SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "question": "Which professionals have done at least two treatments? List the professional's id, role, and first name.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT professional_id , role_code , first_name FROM Professionals GROUP BY professional_id HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of professional_id in Professionals table', 'Step 2: find professional_id, role_code, first_name in Professionals table whose corresponding value in step 1 is greater than or equals 2']", "feedback": "You should make use of treatments table in step 1 and omit professionals table.", "context": "Which professionals have done at least two treatments? List the professional's id, role, and first name. || select professional_id, role_code, first_name from professionals group by professional_id having count ( * ) > = 2 || dog_kennels | professionals : professional_id, role_code, first_name | treatments : professional_id || You should make use of treatments table in step 1 and omit professionals table.", "label": "dog_kennels | select professionals.professional_id, professionals.role_code, professionals.first_name from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) >= 2" }, { "prediction": "cre_Doc_Template_Mgt | select document_id, count ( * ) from paragraphs group by document_id order by count ( * ) asc", "gold_parse": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", "question": "Return the different document ids along with the number of paragraphs corresponding to each, ordered by id.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID , Count ( * ) FROM Paragraphs GROUP BY Document_ID ORDER BY Count ( * ) Asc", "predicted_parse_explanation": "['Step 1: for each value of Document_ID in Paragraphs table, calculate number of rows', 'Step 2: show each value of Document_ID in Paragraphs table along with the corresponding number of rows ordered ascending by the results of step 1']", "feedback": "order by document id", "context": "Return the different document ids along with the number of paragraphs corresponding to each, ordered by id. || select document_id, count ( * ) from paragraphs group by document_id order by count ( * ) asc || cre_Doc_Template_Mgt | paragraphs : document_id || order by document id", "label": "cre_Doc_Template_Mgt | select document_id, count ( * ) from paragraphs group by document_id order by document_id asc" }, { "prediction": "network_1 | select name from highschooler except select highschooler.name from highschooler join friend on highschooler.id = friend.student_id", "gold_parse": "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", "question": "What are the names of students who have no friends?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.name FROM Highschooler AS T1 WHERE T1.ID NOT IN ( SELECT T2.student_id FROM Likes AS T2 )", "predicted_parse_explanation": "['Step 1: find the student_id of Likes table', 'Step 2: find the name of Highschooler table whose ID not one of the results of step 1']", "feedback": "You have to use friend table in step 1.", "context": "What are the names of students who have no friends? || select highschooler.name from highschooler where highschooler.id not in ( select likes.student_id from likes ) || network_1 | highschooler : name, id | friend : student_id || You have to use friend table in step 1.", "label": "network_1 | select name from highschooler except select highschooler.name from friend join highschooler on friend.student_id = highschooler.id" }, { "prediction": "car_1 | select model_list.model, car_names.model from model_list join car_names on model_list.modelid = car_names.model order by car_names.make desc limit 1", "gold_parse": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1", "question": "Which model has the most version(make) of cars?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T3.Edispl FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id GROUP BY T1.Model ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find the number of rows of each value of model_list's Model in the results of step 1\", 'Step 3: find Edispl of the results of step 1 with largest value in the results of step 2']", "feedback": "I want the the car names's model having highest number of make.", "context": "Which model has the most version(make) of cars? || select cars_data.edispl from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id group by model_list.model order by count ( * ) desc limit 1 || car_1 | model_list : model, modelid | car_names : model, make || I want the the car names's model having highest number of make.", "label": "car_1 | select model from car_names group by model order by count ( * ) desc limit 1" }, { "prediction": "battle_death | select battle.name, battle.date from ship join battle on ship.lost_in_battle = battle.id where ship.name = 'Lettice' intersect select battle.name, battle.date from ship join battle on ship.lost_in_battle = battle.id where ship.name = 'HMS Atalanta'", "gold_parse": "SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta'", "question": "List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = \"Lettice\" AND T2.name = \"HMS Atalanta\"", "predicted_parse_explanation": "['Step 1: For each row in battle table, find the corresponding rows in ship table', \"Step 2: find battle's name, date of the results of step 1 whose ship's name equals HMS Atalanta and ship's name equals Lettice\"]", "feedback": "HMS Atalanta and Lettice both should not be the name.", "context": "List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta' || select battle.name, battle.date from battle join ship on battle.id = ship.lost_in_battle where ship.name = 'Lettice' and ship.name = 'HMS Atalanta' || battle_death | battle : name, date, id | ship : lost_in_battle, name ( \"HMS Atalanta\" ) || HMS Atalanta and Lettice both should not be the name.", "label": "battle_death | select battle.name, battle.date from battle join ship on battle.id = ship.lost_in_battle where ship.name = 'Lettice' intersect select battle.name, battle.date from battle join ship on battle.id = ship.lost_in_battle where ship.name = 'HMS Atalanta'" }, { "prediction": "tvshow | select pixel_aspect_ratio_par, country from tv_channel where language!= 'english'", "gold_parse": "SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'", "question": "find the pixel aspect ratio and nation of the tv channels that do not use English.", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Hight_definition_TV , Country FROM TV_Channel WHERE Language ! = \"English\"", "predicted_parse_explanation": "['find the Hight_definition_TV, Country of TV_Channel table for which Language not equals English']", "feedback": "I need pixel aspect ratio par rather than high definition tv.", "context": "find the pixel aspect ratio and nation of the tv channels that do not use English. || select hight_definition_tv, country from tv_channel where language! = 'English' || tvshow | tv_channel : pixel_aspect_ratio_par, country, language ( \"english\" ) || I need pixel aspect ratio par rather than high definition tv.", "label": "tvshow | select pixel_aspect_ratio_par, country from tv_channel where language!= 'English'" }, { "prediction": "flight_2 | select airportname from airports where airportcode = 'AKO'", "gold_parse": "SELECT AirportName FROM AIRPORTS WHERE AirportCode = \"AKO\"", "question": "What is the airport name for airport 'AKO'?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT AirportName FROM airports WHERE AirportName = \"AKO\"", "predicted_parse_explanation": "['find the AirportName of airports table for which AirportName equals AKO']", "feedback": "Exchange 2nd airport name with airport code .", "context": "What is the airport name for airport 'AKO'? || select airportname from airports where airportname = 'AKO' || flight_2 | airports : airportname, airportcode ( \"AKO\" ) || Exchange 2nd airport name with airport code.", "label": "flight_2 | select airportname from airports where airportcode = 'AKO'" }, { "prediction": "orchestra | select orchestra.year_of_founded from performance join orchestra on performance.orchestral_id = orchestra.orchestral_id group by orchestra.year_of_founded having count ( * ) > 1", "gold_parse": "SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1", "question": "Show the years in which orchestras that have given more than one performance are founded.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT Year_of_Founded FROM orchestra GROUP BY Year_of_Founded HAVING Count ( * ) > 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Year_of_Founded in orchestra table', 'Step 2: find Year_of_Founded in orchestra table whose corresponding value in step 1 is greater than 1']", "feedback": "In step 1 , substitute orchestra id in performance table in place of year of founded in orchestra table .", "context": "Show the years in which orchestras that have given more than one performance are founded. || select year_of_founded from orchestra group by year_of_founded having count ( * ) > 1 || orchestra | orchestra : year_of_founded, orchestra_id | performance : orchestra_id || In step 1, substitute orchestra id in performance table in place of year of founded in orchestra table.", "label": "orchestra | select year_of_founded from orchestra join performance on orchestra.orchestra_id = performance.orchestra_id group by performance.orchestra_id having count ( * ) > 1" }, { "prediction": "battle_death | select ship.id, ship.name from ship join death on ship.id = death.caused_by_ship_id group by ship.id order by sum ( death.injured ) desc limit 1", "gold_parse": "SELECT T2.id , T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1", "question": "What is the ship id and name that caused most total injuries?", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT T1.id , T1.name FROM ship AS T1 JOIN death AS T2 ON T1.id = T2.caused_by_ship_id GROUP BY T2.id ORDER BY Sum ( T2.injured ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in ship table, find the corresponding rows in death table', \"Step 2: find the summation of injured of each value of death's id in the results of step 1\", \"Step 3: find ship's id, name of step 1 results with largest value in the results of step 2\"]", "feedback": "In step 2 , I want caused by ship.", "context": "What is the ship id and name that caused most total injuries? || select ship.id, ship.name from ship join death on ship.id = death.caused_by_ship_id group by death.id order by sum ( death.injured ) desc limit 1 || battle_death | ship : id, name | death : caused_by_ship_id, injured || In step 2, I want caused by ship.", "label": "battle_death | select ship.id, ship.name from death join ship on death.caused_by_ship_id = ship.id group by ship.id order by count ( * ) desc limit 1" }, { "prediction": "orchestra | select major_record_format from orchestra order by major_record_format asc", "gold_parse": "SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC", "question": "What are the major record formats of orchestras, sorted by their frequency?", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT Type FROM performance ORDER BY Share Desc", "predicted_parse_explanation": "['find the Type of performance table ordered descending by Share']", "feedback": "You should find the major record format of orchestra in ascending order of share.", "context": "What are the major record formats of orchestras, sorted by their frequency? || select type from performance order by share desc || orchestra | orchestra : major_record_format || You should find the major record format of orchestra in ascending order of share.", "label": "orchestra | select major_record_format from orchestra group by major_record_format order by count ( * ) asc" }, { "prediction": "car_1 | select count ( distinct model_list.model ) from car_makers join model_list on car_makers.id = model_list.maker where car_makers.maker = 'American Motor Company'", "gold_parse": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company'", "question": "What is the number of car models created by the car maker American Motor Company?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM car_makers WHERE Maker = \"American Motor Company\"", "predicted_parse_explanation": "['find the number of rows in car_makers table whose Maker equals American Motor Company']", "feedback": "Find number of rows of model list table whose corresponding car makers's maker equals American Motor Company .", "context": "What is the number of car models created by the car maker American Motor Company? || select count ( * ) from car_makers where maker = 'American Motor Company' || car_1 | model_list : model, maker | car_makers : id, maker ( \"American Motor Company\" ) || Find number of rows of model list table whose corresponding car makers's maker equals American Motor Company.", "label": "car_1 | select count ( * ) from car_makers join model_list on car_makers.id = model_list.maker where car_makers.fullname = 'American Motor Company'" }, { "prediction": "pets_1 | select distinct student.fname, student.age from student join has_pet on student.stuid = has_pet.stuid", "gold_parse": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", "question": "What are the different first names and ages of the students who do have pets?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT DISTINCT T1.Fname , T1.Age FROM Student AS T1 WHERE T1.StuID NOT IN ( SELECT T2.StuID FROM Has_Pet AS T2 )", "predicted_parse_explanation": "['Step 1: find the StuID of Has_Pet table', \"Step 2: find without repetition the Fname, Age of Student table whose Student's StuID not one of the results of step 1\"]", "feedback": "should be one of the results in step 1", "context": "What are the different first names and ages of the students who do have pets? || select distinct student.fname, student.age from student where student.stuid not in ( select has_pet.stuid from has_pet ) || pets_1 | student : fname, age, stuid | has_pet : stuid || should be one of the results in step 1", "label": "pets_1 | select distinct student.fname, student.age from student join has_pet on student.stuid = has_pet.stuid" }, { "prediction": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Asia' group by countrylanguage.language order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1", "question": "What is the language that is used by the largest number of Asian nations?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY Population Desc LIMIT 1", "predicted_parse_explanation": "['find the Name of country table for which Continent equals Asia with largest value of Population']", "feedback": "you need search for the language that are frequently used from countrylanguage's table whose continent should be asia.", "context": "What is the language that is used by the largest number of Asian nations? || select name from country where continent = 'Asia' order by population desc limit 1 || world_1 | countrylanguage : language, countrycode | country : code, continent ( \"Asia\" ) || you need search for the language that are frequently used from countrylanguage's table whose continent should be asia.", "label": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Asia' group by countrylanguage.language order by count ( * ) desc limit 1" }, { "prediction": "concert_singer | select stadium.name, stadium.capacity from stadium join concert on stadium.stadium_id = concert.stadium_id where concert.year > 2013 group by concert.stadium_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.name , T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the name and capacity of the stadium with the most concerts after 2013?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT T1.Name , T1.Capacity FROM stadium AS T1 JOIN concert AS T2 ON T1.Stadium_ID = T2.Stadium_ID WHERE T2.Year > 2014 GROUP BY T1.Stadium_ID ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in stadium table, find the corresponding rows in concert table', 'Step 2: only keep the results of step 1 whose Year greater than 2014', \"Step 3: find the number of rows of each value of stadium's Stadium_ID in the results of step 2\", 'Step 4: find Name, Capacity of the results of step 2 with largest value in the results of step 3']", "feedback": "Ensure year greater than 2013 in step 2", "context": "What is the name and capacity of the stadium with the most concerts after 2013? || select stadium.name, stadium.capacity from stadium join concert on stadium.stadium_id = concert.stadium_id where concert.year > 2014 group by stadium.stadium_id order by count ( * ) desc limit 1 || concert_singer | stadium : name, capacity, stadium_id | concert : stadium_id, year ( 2013 ) || Ensure year greater than 2013 in step 2", "label": "concert_singer | select stadium.name, stadium.capacity from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year >= 2014 group by stadium.stadium_id order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select continent from country group by continent order by count ( distinct language ) desc limit 1", "gold_parse": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1", "question": "Which continent has the most diverse languages?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country GROUP BY Continent ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Continent in country table', 'Step 2: find Continent of country table with largest value in the results of step 1']", "feedback": "i want the continent where highest number of different languages are spoken.", "context": "Which continent has the most diverse languages? || select continent from country group by continent order by count ( * ) desc limit 1 || world_1 | country : continent, language || i want the continent where highest number of different languages are spoken.", "label": "world_1 | select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode group by country.continent order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select airlines.abbreviation, airlines.country from airlines join flights on airlines.uid = flights.airport group by airlines.abbreviation order by count ( * ) asc limit 1", "gold_parse": "SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1", "question": "Find the abbreviation and country of the airline that has fewest number of flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Abbreviation , Country FROM airlines GROUP BY Abbreviation ORDER BY Count ( * ) Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Abbreviation in airlines table', 'Step 2: find Abbreviation, Country of airlines table with smallest value in the results of step 1']", "feedback": "Substitute abbreviation in airlines table with airline in flights table in step 1.", "context": "Find the abbreviation and country of the airline that has fewest number of flights? || select abbreviation, country from airlines group by abbreviation order by count ( * ) asc limit 1 || flight_2 | airlines : abbreviation, country, uid | flights : airline || Substitute abbreviation in airlines table with airline in flights table in step 1.", "label": "flight_2 | select airlines.abbreviation, airlines.country from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) asc limit 1" }, { "prediction": "battle_death | select count ( * ) from ship where disposition_of_ship = 'Captured'", "gold_parse": "SELECT count(*) FROM ship WHERE disposition_of_ship = 'Captured'", "question": "How many ships ended up being 'Captured'?", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM battle WHERE result = \"Captured\"", "predicted_parse_explanation": "['find the number of rows in battle table whose result equals Captured']", "feedback": "Take ship table and disposition of ship in place of battle table and result .", "context": "How many ships ended up being 'Captured'? || select count ( * ) from battle where result = 'Captured' || battle_death | ship : disposition_of_ship ( \"Captured\" ) || Take ship table and disposition of ship in place of battle table and result.", "label": "battle_death | select count ( * ) from ship where disposition_of_ship = 'Captured'" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by flights.airline having count ( * ) >= 10", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10", "question": "Which airlines have at least 10 flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines GROUP BY Airline HAVING Count ( * ) > = 10", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Airline in airlines table', 'Step 2: find Airline in airlines table whose corresponding value in step 1 is greater than or equals 10']", "feedback": "Instead of airlines table, I need flights table in step 1.", "context": "Which airlines have at least 10 flights? || select airline from airlines group by airline having count ( * ) > = 10 || flight_2 | airlines : airline, uid | flights : airline || Instead of airlines table, I need flights table in step 1.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) > 10" }, { "prediction": "orchestra | select count ( * ) from orchestra where major_record_format = 'CD' or major_record_format = 'DVD'", "gold_parse": "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"", "question": "Count the number of orchestras that have CD or DVD as their record format.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM performance WHERE Type > = \"CD\"", "predicted_parse_explanation": "['find the number of rows in performance table whose Type greater than or equals CD']", "feedback": "Supersede 'performance' with 'orchestra' and 'Type greater than or' with 'Major Record Format' CD or DVD .", "context": "Count the number of orchestras that have CD or DVD as their record format. || select count ( * ) from performance where type > = 'CD' || orchestra | orchestra : major_record_format ( \"DVD\" ) || Supersede 'performance' with 'orchestra' and 'Type greater than or' with 'Major Record Format' CD or DVD.", "label": "orchestra | select count ( * ) from orchestra where major_record_format = 'CD' or major_record_format = 'DVD'" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.grade = friend.student_id group by friend.student_id having count ( * ) > 5", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2", "question": "Show the names of students who have a grade higher than 5 and have at least 2 friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler WHERE grade > 2 INTERSECT SELECT name FROM Highschooler WHERE grade < 5", "predicted_parse_explanation": "['Step 1: find the name of Highschooler table for which grade greater than 2', 'Step 2: find the name of Highschooler table for which grade less than 5', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "I want the name of high schooler whose student id should be 2 or more than 2 and grade should be more than 5.", "context": "Show the names of students who have a grade higher than 5 and have at least 2 friends. || select name from highschooler where grade > 2 intersect select name from highschooler where grade < 5 || network_1 | highschooler : name, grade ( 5 ) | friend : student_id || I want the name of high schooler whose student id should be 2 or more than 2 and grade should be more than 5.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id where highschooler.grade > 5 group by friend.student_id having count ( * ) >= 2" }, { "prediction": "wta_1 | select winner_name from matches where year = 2013 intersect select winner_name from matches where year = 2016", "gold_parse": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016", "question": "List the names of all winners who played in both 2013 and 2016.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT loser_name FROM matches WHERE year = 2013 INTERSECT SELECT loser_name FROM matches WHERE year = 2016", "predicted_parse_explanation": "['Step 1: find the loser_name of matches table for which year equals 2013', 'Step 2: find the loser_name of matches table for which year equals 2016', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Rather than loser name , Use winner name In step 1 and 2.", "context": "List the names of all winners who played in both 2013 and 2016. || select loser_name from matches where year = 2013 intersect select loser_name from matches where year = 2016 || wta_1 | matches : winner_name, year ( 2016 ) || Rather than loser name, Use winner name In step 1 and 2.", "label": "wta_1 | select winner_name from matches where year = 2013 intersect select winner_name from matches where year = 2016" }, { "prediction": "world_1 | select name from country where indepyear > 1950", "gold_parse": "SELECT Name FROM country WHERE IndepYear > 1950", "question": "What are the names of all the countries that became independent after 1950?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE IndepYear > 1950", "predicted_parse_explanation": "['find the Continent of country table for which IndepYear greater than 1950']", "feedback": "i want name rather than continent.", "context": "What are the names of all the countries that became independent after 1950? || select continent from country where indepyear > 1950 || world_1 | country : name, indepyear ( 1950 ) || i want name rather than continent.", "label": "world_1 | select name from country where indepyear > 1950" }, { "prediction": "employee_hire_evaluation | select * from hiring", "gold_parse": "SELECT * FROM hiring", "question": "Give me all the information about hiring.", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT * FROM employee", "predicted_parse_explanation": "['find the rows of employee table']", "feedback": "hiring table should be use in place of employee table .", "context": "Give me all the information about hiring. || select * from employee || employee_hire_evaluation | hiring : || hiring table should be use in place of employee table.", "label": "employee_hire_evaluation | select * from hiring" }, { "prediction": "world_1 | select distinct city.name from country join country on city.countrycode = country.code join countrylanguage on city.countrycode = countrylanguage.countrycode where country.continent = 'Asia' and countrylanguage.language = 'Chinese'", "gold_parse": "SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode JOIN city AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = \"Asia\"", "question": "Return the different names of cities that are in Asia and for which Chinese is the official language.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT DISTINCT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = \"T\" AND T2.Name = \"Chinese\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in city table', \"Step 2: find without repetition city's Name of the results of step 1 whose Continent equals T and country's Name equals Chinese\"]", "feedback": "Exchange \"T\" with \"Asia\" and country's name name with countrylanguage's language , ensure that is official equals T .", "context": "Return the different names of cities that are in Asia and for which Chinese is the official language. || select distinct city.name from city join country on city.countrycode = country.code where country.continent = 'T' and country.name = 'Chinese' || world_1 | city : name, countrycode | country : code, continent ( \"Asia\" ) | countrylanguage : countrycode, language ( \"Chinese\" ) || Exchange \"T\" with \"Asia\" and country's name name with countrylanguage's language, ensure that is official equals T.", "label": "world_1 | select distinct city.name from country join countrylanguage on country.code = countrylanguage.countrycode join city on country.code = city.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'Chinese' and country.continent = 'Asia'" }, { "prediction": "dog_kennels | select avg ( dogs.age ) from treatments join dogs on treatments.dog_id = dogs.dog_id", "gold_parse": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", "question": "What is the average age of the dogs who have gone through any treatments?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( age ) FROM Dogs WHERE gender = 1", "predicted_parse_explanation": "['find the average age in Dogs table whose gender equals 1']", "feedback": "Ensure that dog id should be detect in treatment table.", "context": "What is the average age of the dogs who have gone through any treatments? || select avg ( age ) from dogs where gender = 1 || dog_kennels | dogs : age, dog_id | treatments : dog_id || Ensure that dog id should be detect in treatment table.", "label": "dog_kennels | select avg ( age ) from dogs where dog_id in ( select dog_id from treatments )" }, { "prediction": "employee_hire_evaluation | select * from hiring", "gold_parse": "SELECT * FROM hiring", "question": "What is all the information about hiring?", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT * FROM employee", "predicted_parse_explanation": "['find the rows of employee table']", "feedback": "I want hiring table not employee table.", "context": "What is all the information about hiring? || select * from employee || employee_hire_evaluation | hiring : || I want hiring table not employee table.", "label": "employee_hire_evaluation | select * from hiring" }, { "prediction": "pets_1 | select student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where pets.pettype = 'Cat' and has_pet.stuid = 3", "gold_parse": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'", "question": "Find the last name of the student who has a cat that is age 3.", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT LName FROM Student WHERE Age = 3", "predicted_parse_explanation": "['find the LName of Student table for which Age equals 3']", "feedback": "i want pet age instead of age.", "context": "Find the last name of the student who has a cat that is age 3. || select lname from student where age = 3 || pets_1 | student : lname, stuid, age ( 3 ) | has_pet : stuid, petid | pets : petid, pettype ( \"Cat\" ) || i want pet age instead of age.", "label": "pets_1 | select student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pet_age = 3 and pets.pettype = 'cat'" }, { "prediction": "world_1 | select continent from country where name = 'Anguilla'", "gold_parse": "SELECT Continent FROM country WHERE Name = \"Anguilla\"", "question": "What is the continent name which Anguilla belongs to?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country", "predicted_parse_explanation": "['find the Continent of country table']", "feedback": "searching for continent and region whose value is anguilla.", "context": "What is the continent name which Anguilla belongs to? || select continent from country || world_1 | country : continent, name ( \"Anguilla\" ) || searching for continent and region whose value is anguilla.", "label": "world_1 | select continent from country where name = 'Anguilla'" }, { "prediction": "student_transcripts_tracking | select departments.department_name, degree_programs.department_id from departments join degree_programs on departments.department_id = degree_programs.department_id group by departments.department_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.department_name , T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY count(*) DESC LIMIT 1", "question": "Which department offers the most number of degrees? List department name and id.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT department_name , department_id FROM Departments GROUP BY department_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of department_id in Departments table', 'Step 2: find department_name, department_id of Departments table with largest value in the results of step 1']", "feedback": "In step 1 supersede departments table with degree programs table .", "context": "Which department offers the most number of degrees? List department name and id. || select department_name, department_id from departments group by department_id order by count ( * ) desc limit 1 || student_transcripts_tracking | departments : department_name, department_id | degree_programs : department_id || In step 1 supersede departments table with degree programs table.", "label": "student_transcripts_tracking | select departments.department_name, degree_programs.department_id from degree_programs join departments on degree_programs.department_id = departments.department_id group by degree_programs.department_id order by count ( * ) desc limit 1" }, { "prediction": "singer | select citizenship from singer where birth_year < 1945 intersect select citizenship from singer where birth_year > 1955", "gold_parse": "SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955", "question": "Show the citizenship shared by singers with birth year before 1945 and after 1955.", "db_id": "singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "singer", "song" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Singer_ID", "Name", "Birth_Year", "Net_Worth_Millions", "Citizenship", "Song_ID", "Title", "Singer_ID", "Sales", "Highest_Position" ] }, "db_foreign_keys": { "column_id": [ 8 ], "other_column_id": [ 1 ] }, "predicted_parse_with_values": "SELECT Citizenship FROM singer WHERE Birth_Year > 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year < 1955", "predicted_parse_explanation": "['Step 1: find the Citizenship of singer table for which Birth_Year greater than 1945', 'Step 2: find the Citizenship of singer table for which Birth_Year less than 1955', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "In step 1, confirm that birth year is before 1945 and in step 2, make sure birth year is after 1955.", "context": "Show the citizenship shared by singers with birth year before 1945 and after 1955. || select citizenship from singer where birth_year > 1945 intersect select citizenship from singer where birth_year < 1955 || singer | singer : citizenship, birth_year ( 1955 ) || In step 1, confirm that birth year is before 1945 and in step 2, make sure birth year is after 1955.", "label": "singer | select citizenship from singer where birth_year < 1945 intersect select citizenship from singer where birth_year > 1955" }, { "prediction": "singer | select name from singer where birth_year = 1948 or birth_year = 1949", "gold_parse": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949", "question": "Show the name of singers whose birth year is either 1948 or 1949?", "db_id": "singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "singer", "song" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Singer_ID", "Name", "Birth_Year", "Net_Worth_Millions", "Citizenship", "Song_ID", "Title", "Singer_ID", "Sales", "Highest_Position" ] }, "db_foreign_keys": { "column_id": [ 8 ], "other_column_id": [ 1 ] }, "predicted_parse_with_values": "SELECT Name FROM singer WHERE Citizenship = 1949 OR Citizenship = 1948", "predicted_parse_explanation": "['find Name of singer table whose Citizenship equals 1948 or Citizenship equals 1949']", "feedback": "You need to alter citizenship with year of birth.", "context": "Show the name of singers whose birth year is either 1948 or 1949? || select name from singer where citizenship = 1949 or citizenship = 1948 || singer | singer : name, birth_year ( 1949 ) || You need to alter citizenship with year of birth.", "label": "singer | select name from singer where birth_year = 1948 or birth_year = 1949" }, { "prediction": "network_1 | select count ( * ) from highschooler join likes on highschooler.id = likes.student_id where highschooler.name = 'Kyle'", "gold_parse": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "question": "How many likes does Kyle have?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Highschooler WHERE name = \"Kyle\"", "predicted_parse_explanation": "['find the number of rows in Highschooler table whose name equals Kyle']", "feedback": "You need to determine the number of rows in likes table whose student id's should correspond to high school student whose name is Kyle.", "context": "How many likes does Kyle have? || select count ( * ) from highschooler where name = 'Kyle' || network_1 | highschooler : id, name ( \"Kyle\" ) | likes : student_id || You need to determine the number of rows in likes table whose student id's should correspond to high school student whose name is Kyle.", "label": "network_1 | select count ( * ) from likes join highschooler on likes.student_id = highschooler.id where highschooler.name = 'Kyle'" }, { "prediction": "car_1 | select model from model_list group by model order by count ( distinct model ) desc limit 1", "gold_parse": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1", "question": "What model has the most different versions?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Model FROM model_list GROUP BY Model ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Model in model_list table', 'Step 2: find Model of model_list table with largest value in the results of step 1']", "feedback": "Supersede model list table with car names table in step 1.", "context": "What model has the most different versions? || select model from model_list group by model order by count ( * ) desc limit 1 || car_1 | model_list : model || Supersede model list table with car names table in step 1.", "label": "car_1 | select model from car_names group by model order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select countrycode from countrylanguage where language!= 'english'", "gold_parse": "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != \"English\"", "question": "Give the country codes for countries in which people speak langauges that are not English.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Continent FROM country AS T1 EXCEPT SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\"", "predicted_parse_explanation": "['Step 1: find the Continent of country table', 'Step 2: For each row in country table, find the corresponding rows in countrylanguage table', 'Step 3: find Continent of the results of step 2 whose Language equals English', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "Change continent with code , ensure language is not equals English in step 1.", "context": "Give the country codes for countries in which people speak langauges that are not English. || select country.continent from country except select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' || world_1 | countrylanguage : countrycode, language ( \"english\" ) || Change continent with code, ensure language is not equals English in step 1.", "label": "world_1 | select distinct countrycode from countrylanguage where language!= 'English'" }, { "prediction": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba' group by countrylanguage.language order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\" ORDER BY Percentage DESC LIMIT 1", "question": "Which language is the most popular in Aruba?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Code2 FROM country GROUP BY Code2 ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Code2 in country table', 'Step 2: find Code2 of country table with largest value in the results of step 1']", "feedback": "Find percentage in countrylanguage ( step 1). exchange code 2 of country with language in countrylanguage , ensure name name equals Aruba .", "context": "Which language is the most popular in Aruba? || select code2 from country group by code2 order by count ( * ) desc limit 1 || world_1 | countrylanguage : language, countrycode | country : code, name ( \"Aruba\" ) || Find percentage in countrylanguage ( step 1). exchange code 2 of country with language in countrylanguage, ensure name name equals Aruba.", "label": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba' order by percentage desc limit 1" }, { "prediction": "museum_visit | select name from museum where num_of_staff > ( select min ( num_of_staff ) from museum where open_year > 2010 )", "gold_parse": "SELECT name FROM museum WHERE num_of_staff > (SELECT min(num_of_staff) FROM museum WHERE open_year > 2010)", "question": "find the names of museums which have more staff than the minimum staff number of all museums opened after 2010.", "db_id": "museum_visit", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "museum", "visitor", "visit" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "Museum_ID", "Name", "Num_of_Staff", "Open_Year", "ID", "Name", "Level_of_membership", "Age", "Museum_ID", "visitor_ID", "Num_of_Ticket", "Total_spent" ] }, "db_foreign_keys": { "column_id": [ 10, 9 ], "other_column_id": [ 5, 1 ] }, "predicted_parse_with_values": "SELECT Name FROM museum WHERE Num_of_Staff > ( SELECT Min ( Num_of_Staff ) FROM museum WHERE Open_Year < 2010 )", "predicted_parse_explanation": "['Step 1: find the minimum Num_of_Staff in museum table whose Open_Year less than 2010', 'Step 2: find the Name of museum table whose Num_of_Staff greater than the results of step 1']", "feedback": "in step 1, the value of open year has to be greater than 2010.", "context": "find the names of museums which have more staff than the minimum staff number of all museums opened after 2010. || select name from museum where num_of_staff > ( select min ( num_of_staff ) from museum where open_year < 2010 ) || museum_visit | museum : name, num_of_staff, open_year ( 2010 ) || in step 1, the value of open year has to be greater than 2010.", "label": "museum_visit | select name from museum where num_of_staff > ( select min ( num_of_staff ) from museum where open_year > 2010 )" }, { "prediction": "network_1 | select count ( * ) from likes join highschooler on likes.student_id = highschooler.id where highschooler.name = 'Kyle'", "gold_parse": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "question": "Return the number of likes that the high schooler named Kyle has.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Highschooler WHERE grade = \"Kyle\"", "predicted_parse_explanation": "['find the number of rows in Highschooler table whose grade equals Kyle']", "feedback": "Put likes table instead of high schooler table and name instead of grade .", "context": "Return the number of likes that the high schooler named Kyle has. || select count ( * ) from highschooler where grade = 'Kyle' || network_1 | likes : student_id | highschooler : id, name ( \"Kyle\" ) || Put likes table instead of high schooler table and name instead of grade.", "label": "network_1 | select count ( * ) from likes join highschooler on likes.student_id = highschooler.id where highschooler.name = 'Kyle'" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by flights.airline having count ( * ) >= 10", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10", "question": "Find all airlines that have at least 10 flights.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines GROUP BY Airline HAVING Count ( * ) > = 10", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Airline in airlines table', 'Step 2: find Airline in airlines table whose corresponding value in step 1 is greater than or equals 10']", "feedback": "Use table of flights with table of airlines in step 1.", "context": "Find all airlines that have at least 10 flights. || select airline from airlines group by airline having count ( * ) > = 10 || flight_2 | airlines : airline, uid | flights : airline || Use table of flights with table of airlines in step 1.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) > 10" }, { "prediction": "battle_death | select count ( * ) from ship where disposition_of_ship = 'Captured'", "gold_parse": "SELECT count(*) FROM ship WHERE disposition_of_ship = 'Captured'", "question": "How many ships ended up being 'Captured'?", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM battle WHERE result = \"Captured\"", "predicted_parse_explanation": "['find the number of rows in battle table whose result equals Captured']", "feedback": "It is needed to put ship table and disposition of ship rather than battle table and result.", "context": "How many ships ended up being 'Captured'? || select count ( * ) from battle where result = 'Captured' || battle_death | ship : disposition_of_ship ( \"Captured\" ) || It is needed to put ship table and disposition of ship rather than battle table and result.", "label": "battle_death | select count ( * ) from ship where disposition_of_ship = 'Captured'" }, { "prediction": "flight_2 | select count ( * ) from airlines join flights on airlines.uid = flights.airport where airlines.airport = 'JetBlue Airways'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", "question": "How many flights does airline 'JetBlue Airways' have?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines WHERE Airline = \"JetBlue Airways\"", "predicted_parse_explanation": "['find the number of rows in airlines table whose Airline equals JetBlue Airways']", "feedback": "From flights table look for the rows number which is equivalent to the name of airport of airlines table is JetBlue Airways.", "context": "How many flights does airline 'JetBlue Airways' have? || select count ( * ) from airlines where airline = 'JetBlue Airways' || flight_2 | airlines : uid, airline ( \"JetBlue Airways\" ) | flights : airline || From flights table look for the rows number which is equivalent to the name of airport of airlines table is JetBlue Airways.", "label": "flight_2 | select count ( * ) from flights join airlines on flights.airline = airlines.uid where airlines.airline = 'JetBlue Airways'" }, { "prediction": "student_transcripts_tracking | select courses.course_name, courses.course_id from courses join sections on courses.course_id = sections.course_id group by courses.course_name having count ( * ) <= 2", "gold_parse": "SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2", "question": "What are the names and id of courses having at most 2 sections?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name , course_id FROM Courses GROUP BY course_id HAVING Count ( * ) < = 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of course_id in Courses table', 'Step 2: find course_name, course_id in Courses table whose corresponding value in step 1 is less than or equals 2']", "feedback": "Only sections should be used in step 1.", "context": "What are the names and id of courses having at most 2 sections? || select course_name, course_id from courses group by course_id having count ( * ) < = 2 || student_transcripts_tracking | courses : course_name, course_id | sections : course_id || Only sections should be used in step 1.", "label": "student_transcripts_tracking | select courses.course_name, courses.course_id from courses join sections on courses.course_id = sections.course_id group by courses.course_id having count ( * ) <= 2" }, { "prediction": "cre_Doc_Template_Mgt | select version_number, template_type_code from templates order by version_number asc limit 1", "gold_parse": "SELECT min(Version_Number) , template_type_code FROM Templates", "question": "What the smallest version number and its template type code?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT * , Template_Type_Code FROM Templates ORDER BY Template_Type_Code Asc LIMIT 1", "predicted_parse_explanation": "['find the rows, Template_Type_Code of Templates table with smallest value of Template_Type_Code']", "feedback": "Use \"smallest value of version number instead of \"smallest value of Template Type Code\".", "context": "What the smallest version number and its template type code? || select *, template_type_code from templates order by template_type_code asc limit 1 || cre_Doc_Template_Mgt | templates : version_number, template_type_code || Use \"smallest value of version number instead of \"smallest value of Template Type Code\".", "label": "cre_Doc_Template_Mgt | select min ( version_number ), template_type_code from templates" }, { "prediction": "world_1 | select count ( distinct countrylanguage.language ), country.code from country join countrylanguage on country.countrycode = countrylanguage.countrycode where country.indepyear < 1930 group by countrylanguage.language", "gold_parse": "SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = \"T\"", "question": "For the countries founded before 1930, what is the total number of distinct official languages?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Code2 , Count ( DISTINCT Code ) FROM country WHERE IndepYear < 1930 GROUP BY GovernmentForm", "predicted_parse_explanation": "['Step 1: find rows in country table whose IndepYear less than 1930', 'Step 2: find each value of GovernmentForm in the results of step 1 along with the Code of the corresponding rows to each value']", "feedback": "in step 2,look for summation of unique language of country language for which t is is official.", "context": "For the countries founded before 1930, what is the total number of distinct official languages? || select code2, count ( distinct code ) from country where indepyear < 1930 group by governmentform || world_1 | countrylanguage : language, countrycode | country : code, indepyear ( 1930 ) || in step 2,look for summation of unique language of country language for which t is is official.", "label": "world_1 | select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where indepyear < 1930 and countrylanguage.isofficial = 'T'" }, { "prediction": "dog_kennels | select treatment_types.treatment_type_description from treatment_types join treatments on treatment_types.treatment_type_code = treatments.treatment_type_code group by treatments.treatment_type_code order by sum ( treatments.cost_of_treatment ) asc limit 1", "gold_parse": "SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1", "question": "What is the description of the treatment type that costs the least money in total?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T1.treatment_type_description FROM Treatment_Types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T2.treatment_type_code ORDER BY Count ( * ) Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Treatment_Types table, find the corresponding rows in Treatments table', \"Step 2: find the number of rows of each value of Treatments's treatment_type_code in the results of step 1\", 'Step 3: find treatment_type_description of step 1 results with smallest value in the results of step 2']", "feedback": "In step 2 , find summation of date of treatment in treatments table for each treatment type code .", "context": "What is the description of the treatment type that costs the least money in total? || select treatment_types.treatment_type_description from treatment_types join treatments on treatment_types.treatment_type_code = treatments.treatment_type_code group by treatments.treatment_type_code order by count ( * ) asc limit 1 || dog_kennels | treatment_types : treatment_type_description, treatment_type_code | treatments : treatment_type_code, cost_of_treatment || In step 2, find summation of date of treatment in treatments table for each treatment type code.", "label": "dog_kennels | select treatment_types.treatment_type_description from treatment_types join treatments on treatment_types.treatment_type_code = treatments.treatment_type_code group by treatment_types.treatment_type_code order by sum ( cost_of_treatment ) asc limit 1" }, { "prediction": "car_1 | select continents.continent, count ( * ) from continents join countries on continents.contid = countries.countryname join car_makers on continents.contid = car_makers.id group by continents.contid", "gold_parse": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent", "question": "How many car makers are there in each continents? List the continent name and the count.", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Continent , Count ( * ) FROM continents GROUP BY Continent", "predicted_parse_explanation": "['find each value of Continent in continents table along with the number of the corresponding rows to each value']", "feedback": "in car makers table, i want the total rows for each continent.", "context": "How many car makers are there in each continents? List the continent name and the count. || select continent, count ( * ) from continents group by continent || car_1 | continents : continent, contid | countries : countryname, continent | car_makers : id || in car makers table, i want the total rows for each continent.", "label": "car_1 | select continents.continent, count ( * ) from continents join countries on continents.contid = countries.continent join car_makers on countries.countryid = car_makers.country group by continents.continent" }, { "prediction": "student_transcripts_tracking | select students.first_name from addresses join students on addresses.address_id = students.permanent_address_id where addresses.country = 'Haiti' or students.cell_mobile_number = '09700166582'", "gold_parse": "SELECT T1.first_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.permanent_address_id = T2.address_id WHERE T2.country = 'Haiti' UNION SELECT first_name FROM Students WHERE cell_mobile_number = '09700166582'", "question": "Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T2.first_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id WHERE T1.country = \"Iceland\" OR T2.cell_mobile_number = \"(096)889-8954x524\" UNION SELECT T2.first_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id WHERE T1.country = 09700166582 OR T2.cell_mobile_number = \"Haiti\"", "predicted_parse_explanation": "['Step 1: For each row in Addresses table, find the corresponding rows in Students table', 'Step 2: find first_name of the results of step 1 whose country equals Iceland or cell_mobile_number equals (096)889-8954x524', 'Step 3: find first_name of the results of step 1 whose country equals 09700166582 or cell_mobile_number equals Haiti', 'Step 4: show the rows that are in any of the results of step 2 or the results of step 3']", "feedback": "I want the first name of that student whose cell number is 09700166582 and lives permanently in Haiti. ", "context": "Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582. || select students.first_name from addresses join students on addresses.address_id = students.current_address_id where addresses.country = 'Iceland' or students.cell_mobile_number = '(096)889-8954x524' union select students.first_name from addresses join students on addresses.address_id = students.current_address_id where addresses.country = 09700166582 or students.cell_mobile_number = 'Haiti' || student_transcripts_tracking | students : first_name, permanent_address_id, cell_mobile_number ( \"09700166582\" ) | addresses : address_id, country ( \"Haiti\" ) || I want the first name of that student whose cell number is 09700166582 and lives permanently in Haiti.", "label": "student_transcripts_tracking | select students.first_name from students join addresses on students.permanent_address_id = addresses.address_id where addresses.country = 'Haiti' union select first_name from students where cell_mobile_number = '09700166582'" }, { "prediction": "dog_kennels | select professionals.professional_id, professionals.role_code, professionals.first_name from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) >= 2", "gold_parse": "SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "question": "What are the id, role, and first name of the professionals who have performed two or more treatments?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT professional_id , role_code , first_name FROM Professionals GROUP BY professional_id HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of professional_id in Professionals table', 'Step 2: find professional_id, role_code, first_name in Professionals table whose corresponding value in step 1 is greater than or equals 2']", "feedback": "you should hold the \"professional id in treatments table in step 1.", "context": "What are the id, role, and first name of the professionals who have performed two or more treatments? || select professional_id, role_code, first_name from professionals group by professional_id having count ( * ) > = 2 || dog_kennels | professionals : professional_id, role_code, first_name | treatments : professional_id || you should hold the \"professional id in treatments table in step 1.", "label": "dog_kennels | select professionals.professional_id, professionals.role_code, professionals.first_name from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) >= 2" }, { "prediction": "dog_kennels | select breed_code, size_code from dogs", "gold_parse": "SELECT DISTINCT breed_code , size_code FROM dogs", "question": "What are all the possible breed type and size type combinations?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.treatment_type_code , T1.weight FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id", "predicted_parse_explanation": "['Step 1: For each row in Dogs table, find the corresponding rows in Treatments table', 'Step 2: find treatment_type_code, weight of the results of step 1']", "feedback": "Interchange treatment type code , weight with distinct breed code , size code in step 2.", "context": "What are all the possible breed type and size type combinations? || select treatments.treatment_type_code, dogs.weight from dogs join treatments on dogs.dog_id = treatments.dog_id || dog_kennels | dogs : breed_code, size_code || Interchange treatment type code, weight with distinct breed code, size code in step 2.", "label": "dog_kennels | select distinct breed_code, size_code from dogs" }, { "prediction": "tvshow | select pixel_aspect_ratio_par, country from tv_channel where language!= 'english'", "gold_parse": "SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'", "question": "find the pixel aspect ratio and nation of the tv channels that do not use English.", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Hight_definition_TV , Country FROM TV_Channel WHERE Language ! = \"English\"", "predicted_parse_explanation": "['find the Hight_definition_TV, Country of TV_Channel table for which Language not equals English']", "feedback": "Supersede hight definition tv with pixel aspect ratio par .", "context": "find the pixel aspect ratio and nation of the tv channels that do not use English. || select hight_definition_tv, country from tv_channel where language! = 'English' || tvshow | tv_channel : pixel_aspect_ratio_par, country, language ( \"english\" ) || Supersede hight definition tv with pixel aspect ratio par.", "label": "tvshow | select pixel_aspect_ratio_par, country from tv_channel where language!= 'English'" }, { "prediction": "dog_kennels | select treatments.cost_of_treatment, treatment_types.treatment_type_description from treatments join treatment_types on treatments.treatment_type_code = treatment_types.treatment_type_code", "gold_parse": "SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code", "question": "What are the cost and treatment type description of each treatment?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT treatment_type_description , treatment_type_code FROM Treatment_Types", "predicted_parse_explanation": "['find the treatment_type_description, treatment_type_code of Treatment_Types table']", "feedback": "No need to find treatment type code so find treatments 's date of treatment instead of that .", "context": "What are the cost and treatment type description of each treatment? || select treatment_type_description, treatment_type_code from treatment_types || dog_kennels | treatments : cost_of_treatment, treatment_type_code | treatment_types : treatment_type_description, treatment_type_code || No need to find treatment type code so find treatments's date of treatment instead of that.", "label": "dog_kennels | select treatments.cost_of_treatment, treatment_types.treatment_type_description from treatments join treatment_types on treatments.treatment_type_code = treatment_types.treatment_type_code" }, { "prediction": "car_1 | select avg ( horsepower ) from cars_data where year < 1980", "gold_parse": "SELECT avg(horsepower) FROM CARS_DATA WHERE YEAR < 1980", "question": "What is the average horsepower for all cards produced before 1980?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Avg ( T1.Maker ) FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T3.Year < 1980", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', 'Step 2: find the average Maker in the results of step 1 whose Year less than 1980']", "feedback": "in step 2, use horsepower instead of maker.", "context": "What is the average horsepower for all cards produced before 1980? || select avg ( model_list.maker ) from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.year < 1980 || car_1 | cars_data : horsepower, year ( 1980 ) || in step 2, use horsepower instead of maker.", "label": "car_1 | select avg ( horsepower ) from cars_data where year < 1980" }, { "prediction": "world_1 | select sum ( population ) from city where district = 'Gelderland'", "gold_parse": "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"", "question": "What is the total population of Gelderland district?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Sum ( Population ) FROM country", "predicted_parse_explanation": "['find the summation of Population in country table']", "feedback": "You need to ascertain that the district name should be Gelderland. ", "context": "What is the total population of Gelderland district? || select sum ( population ) from country || world_1 | city : population, district ( \"Gelderland\" ) || You need to ascertain that the district name should be Gelderland.", "label": "world_1 | select sum ( population ) from city where district = 'Gelderland'" }, { "prediction": "world_1 | select avg ( lifeexpectancy ) from country where region = 'Central Africa'", "gold_parse": "SELECT avg(LifeExpectancy) FROM country WHERE Region = \"Central Africa\"", "question": "How long is the people\u2019s average life expectancy in Central Africa?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( LifeExpectancy ) FROM country WHERE Continent = \"Central Africa\"", "predicted_parse_explanation": "['find the average LifeExpectancy in country table whose Continent equals Central Africa']", "feedback": "you need to interchange between continent and region.", "context": "How long is the people\u2019s average life expectancy in Central Africa? || select avg ( lifeexpectancy ) from country where continent = 'Central Africa' || world_1 | country : lifeexpectancy, region ( \"Central Africa\" ) || you need to interchange between continent and region.", "label": "world_1 | select avg ( lifeexpectancy ) from country where region = 'Central Africa'" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id having count ( * ) >= 3", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3", "question": "What are the names of high schoolers who have 3 or more friends?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler GROUP BY grade , grade HAVING Count ( * ) > = 3", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of grade, grade in Highschooler table', 'Step 2: find name in Highschooler table whose corresponding value in step 1 is greater than or equals 3']", "feedback": "Use student id in friend table instead of grade , grade in high schooler table in step 1.", "context": "What are the names of high schoolers who have 3 or more friends? || select name from highschooler group by grade, grade having count ( * ) > = 3 || network_1 | highschooler : name, id | friend : student_id || Use student id in friend table instead of grade, grade in high schooler table in step 1.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id having count ( * ) >= 3" }, { "prediction": "world_1 | select city.name from city join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'english' group by city.name", "gold_parse": "SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = \"English\" ORDER BY T1.Population DESC LIMIT 1", "question": "What is the most populace city that speaks English?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code JOIN countrylanguage AS T3 ON T2.Code = T3.CountryCode WHERE T3.Language = \"English\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find corresponding rows in city table and in countrylanguage table', \"Step 2: find city's Name of the results of step 1 whose Language equals English\"]", "feedback": "Be certain to find only for which population is maximum .", "context": "What is the most populace city that speaks English? || select city.name from city join country on city.countrycode = country.code join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' || world_1 | city : name, population | countrylanguage : countrycode, language ( \"english\" ) || Be certain to find only for which population is maximum.", "label": "world_1 | select city.name, city.population from city join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'English' order by city.population desc limit 1" }, { "prediction": "world_1 | select population, lifeexpectancy from country where name = 'Brazil'", "gold_parse": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"", "question": "Give me Brazil\u2019s population and life expectancies.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Population , Continent FROM country", "predicted_parse_explanation": "['find the Population, Continent of country table']", "feedback": "Replace continent with life expectancy , Ensure to find for which name name equals Brazil .", "context": "Give me Brazil\u2019s population and life expectancies. || select population, continent from country || world_1 | country : population, lifeexpectancy, name ( \"Brazil\" ) || Replace continent with life expectancy, Ensure to find for which name name equals Brazil.", "label": "world_1 | select population, lifeexpectancy from country where name = 'Brazil'" }, { "prediction": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1", "question": "What is name of the country that speaks the largest number of languages?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country GROUP BY Continent ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Continent in country table', 'Step 2: find Continent of country table with largest value in the results of step 1']", "feedback": "Need to find country's name where maximum languages are used in that country .", "context": "What is name of the country that speaks the largest number of languages? || select continent from country group by continent order by count ( * ) desc limit 1 || world_1 | country : name, code | countrylanguage : countrycode || Need to find country's name where maximum languages are used in that country.", "label": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name order by count ( * ) desc limit 1" }, { "prediction": "student_transcripts_tracking | select addresses.address_id, students.current_address_id from addresses join students on addresses.address_id = students.current_address_id group by addresses.address_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.address_id , T1.line_1 , T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1", "question": "Which address holds the most number of students currently? List the address id and all lines.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT current_address_id , email_address FROM Students GROUP BY permanent_address_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of permanent_address_id in Students table', 'Step 2: find current_address_id, email_address of Students table with largest value in the results of step 1']", "feedback": "Change permanent address id with current address id in step 1 , only find address id , line 1 , line 2 , line 3 in step2.", "context": "Which address holds the most number of students currently? List the address id and all lines. || select current_address_id, email_address from students group by permanent_address_id order by count ( * ) desc limit 1 || student_transcripts_tracking | addresses : address_id, line_1 | students : current_address_id || Change permanent address id with current address id in step 1, only find address id, line 1, line 2, line 3 in step2.", "label": "student_transcripts_tracking | select addresses.address_id, addresses.line_1, addresses.line_2 from addresses join students on addresses.address_id = students.current_address_id group by addresses.address_id order by count ( * ) desc limit 1" }, { "prediction": "dog_kennels | select charge_amount from charges order by charge_type desc limit 1", "gold_parse": "SELECT max(charge_amount) FROM Charges", "question": "What is the charge amount of the most expensive charge type?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT charge_amount FROM Charges ORDER BY charge_amount Desc LIMIT 1", "predicted_parse_explanation": "['find the charge_amount of Charges table with largest value of charge_amount']", "feedback": "Use charge type instead of first charge amount .", "context": "What is the charge amount of the most expensive charge type? || select charge_amount from charges order by charge_amount desc limit 1 || dog_kennels | charges : charge_amount, charge_type || Use charge type instead of first charge amount.", "label": "dog_kennels | select max ( charge_amount ) from charges" }, { "prediction": "world_1 | select name, surfacearea from country order by surfacearea desc limit 5", "gold_parse": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5", "question": "What are the names and areas of countries with the top 5 largest area?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name , Continent FROM country ORDER BY SurfaceArea Desc LIMIT 5", "predicted_parse_explanation": "['Step 1: find the Name, Continent of country table ordered descending by SurfaceArea', 'Step 2: only show the first 5 rows of the results']", "feedback": "In place of continent , put surface area .", "context": "What are the names and areas of countries with the top 5 largest area? || select name, continent from country order by surfacearea desc limit 5 || world_1 | country : name, surfacearea || In place of continent, put surface area.", "label": "world_1 | select name, surfacearea from country order by surfacearea desc limit 5" }, { "prediction": "car_1 | select avg ( horsepower ) from cars_data where year < 1980", "gold_parse": "SELECT avg(horsepower) FROM CARS_DATA WHERE YEAR < 1980", "question": "What is the average horsepower of the cars before 1980?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Avg ( Edispl ) FROM cars_data WHERE Year < 1980", "predicted_parse_explanation": "['find the average Edispl in cars_data table whose Year less than 1980']", "feedback": "you should use the horsepower instead of edispl.", "context": "What is the average horsepower of the cars before 1980? || select avg ( edispl ) from cars_data where year < 1980 || car_1 | cars_data : horsepower, year ( 1980 ) || you should use the horsepower instead of edispl.", "label": "car_1 | select avg ( horsepower ) from cars_data where year < 1980" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) < 200", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200", "question": "Which airlines have less than 200 flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines GROUP BY Airline HAVING Count ( * ) < 200", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Airline in airlines table', 'Step 2: find Airline in airlines table whose corresponding value in step 1 is less than 200']", "feedback": "In step 1 Switch airlines table with flights table .", "context": "Which airlines have less than 200 flights? || select airline from airlines group by airline having count ( * ) < 200 || flight_2 | airlines : airline, uid | flights : airline || In step 1 Switch airlines table with flights table.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) < 200" }, { "prediction": "world_1 | select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba'", "gold_parse": "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", "question": "What is the total number of languages used in Aruba?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT T2.Language ) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Aruba\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in countrylanguage table', 'Step 2: find the number of different Language in the results of step 1 whose Continent equals Aruba']", "feedback": "country's name name should be Aruba , not continent .", "context": "What is the total number of languages used in Aruba? || select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Aruba' || world_1 | countrylanguage : language, countrycode | country : code, name ( \"Aruba\" ) || country's name name should be Aruba, not continent.", "label": "world_1 | select count ( countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba'" }, { "prediction": "student_transcripts_tracking | select semesters.semester_name, semesters.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id group by semesters.semester_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the semester which most student registered in? Show both the name and the id.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT semester_name , semester_id FROM Semesters GROUP BY semester_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of semester_id in Semesters table', 'Step 2: find semester_name, semester_id of Semesters table with largest value in the results of step 1']", "feedback": "In step 1 , You need to use student enrolment table.", "context": "What is the semester which most student registered in? Show both the name and the id. || select semester_name, semester_id from semesters group by semester_id order by count ( * ) desc limit 1 || student_transcripts_tracking | semesters : semester_name, semester_id | student_enrolment : semester_id || In step 1, You need to use student enrolment table.", "label": "student_transcripts_tracking | select semesters.semester_name, semesters.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id group by semesters.semester_id order by count ( * ) desc limit 1" }, { "prediction": "pets_1 | select fname from student where stuid in ( select has_pet.stuid from has_pet join pets on has_pet.petid = pets.petid where pets.pettype = 'Dog' except select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where pets.pettype = 'Cat' )", "gold_parse": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "question": "What is the first name of every student who has a dog but does not have a cat?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT T1.Fname FROM Student AS T1 WHERE T1.StuID IN ( SELECT T2.StuID FROM Has_Pet AS T2 ) EXCEPT SELECT T1.Fname FROM Student AS T1", "predicted_parse_explanation": "['Step 1: find the StuID of Has_Pet table', \"Step 2: find the Fname of Student table whose Student's StuID one of the results of step 1\", 'Step 3: find the Fname of Student table', 'Step 4: show the rows that are in the results of step 2 but not in the results of step 3']", "feedback": "make sure to determine the pet's pet type equivalent to dog. ", "context": "What is the first name of every student who has a dog but does not have a cat? || select student.fname from student where student.stuid in ( select has_pet.stuid from has_pet ) except select student.fname from student as student || pets_1 | student : fname, stuid | has_pet : stuid, petid | pets : petid, pettype ( \"Cat\" ) || make sure to determine the pet's pet type equivalent to dog.", "label": "pets_1 | select student.fname, student.age from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog' and student.stuid not in ( select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' )" }, { "prediction": "student_transcripts_tracking | select semester_name from semesters where semester_id not in ( select semester_id from student_enrolment )", "gold_parse": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", "question": "What is the name of the semester with no students enrolled?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T1.course_name FROM Courses AS T1 WHERE T1.course_name NOT IN ( SELECT T2.semester_name FROM Semesters AS T2 )", "predicted_parse_explanation": "['Step 1: find the semester_name of Semesters table', 'Step 2: find the course_name of Courses table whose course_name not one of the results of step 1']", "feedback": "Find those semester name whose semester id not present in student enrolment table .", "context": "What is the name of the semester with no students enrolled? || select courses.course_name from courses where courses.course_name not in ( select semesters.semester_name from semesters ) || student_transcripts_tracking | semesters : semester_name, semester_id | student_enrolment : semester_id || Find those semester name whose semester id not present in student enrolment table.", "label": "student_transcripts_tracking | select semester_name from semesters where semester_id not in ( select semester_id from student_enrolment )" }, { "prediction": "dog_kennels | select dogs.name, treatments.date_of_treatment from dogs join treatments on dogs.breed_code = treatments.dog_id group by dogs.breed_code order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )", "question": "Which dogs are of the rarest breed? Show their names and treatment dates.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT name , date_of_birth FROM Dogs ORDER BY weight Desc LIMIT 1", "predicted_parse_explanation": "['find the name, date_of_birth of Dogs table with largest value of weight']", "feedback": "Should count rows of Dogs's breed code , find name , Treatments's date of treatment for smallest value of step 1.", "context": "Which dogs are of the rarest breed? Show their names and treatment dates. || select name, date_of_birth from dogs order by weight desc limit 1 || dog_kennels | dogs : name, breed_code | treatments : date_of_treatment, dog_id || Should count rows of Dogs's breed code, find name, Treatments's date of treatment for smallest value of step 1.", "label": "dog_kennels | select dogs.name, treatments.date_of_treatment from dogs join treatments on dogs.dog_id = treatments.dog_id where dogs.breed_code = ( select breed_code from dogs group by breed_code order by count ( * ) asc limit 1 )" }, { "prediction": "student_transcripts_tracking | select line_1, line_2 from addresses", "gold_parse": "SELECT line_1 , line_2 FROM addresses", "question": "What is the first and second line for all addresses?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T2.first_name , T1.line_1 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id", "predicted_parse_explanation": "['Step 1: For each row in Addresses table, find the corresponding rows in Students table', 'Step 2: find first_name, line_1 of the results of step 1']", "feedback": "In step 2 Replace first name with line 2.", "context": "What is the first and second line for all addresses? || select students.first_name, addresses.line_1 from addresses join students on addresses.address_id = students.current_address_id || student_transcripts_tracking | addresses : line_1, line_2 || In step 2 Replace first name with line 2.", "label": "student_transcripts_tracking | select line_1, line_2 from addresses" }, { "prediction": "tvshow | select id from tv_channel group by id having count ( * ) > 2", "gold_parse": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2", "question": "What are the ids of all tv channels that have more than 2 TV channels?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Channel FROM TV_series GROUP BY Channel HAVING Count ( * ) > 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Channel in TV_series table', 'Step 2: find Channel in TV_series table whose corresponding value in step 1 is greater than 2']", "feedback": "In step 2, id of TV Channel and tv channel table should be supplant in place of channel, tv series table.", "context": "What are the ids of all tv channels that have more than 2 TV channels? || select channel from tv_series group by channel having count ( * ) > 2 || tvshow | tv_channel : id || In step 2, id of TV Channel and tv channel table should be supplant in place of channel, tv series table.", "label": "tvshow | select id from tv_channel group by country having count ( * ) > 2" }, { "prediction": "flight_2 | select airports.city from airports join flights on airports.airportcode = flights.destairport group by airports.city order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "question": "Which city has most number of departing flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT City FROM airports GROUP BY City ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of City in airports table', 'Step 2: find City of airports table with largest value in the results of step 1']", "feedback": "It should be city of source airport in flights table in place of city , airports table in step 1.", "context": "Which city has most number of departing flights? || select city from airports group by city order by count ( * ) desc limit 1 || flight_2 | airports : city, airportcode | flights : destairport || It should be city of source airport in flights table in place of city, airports table in step 1.", "label": "flight_2 | select airports.city from airports join flights on airports.airportcode = flights.sourceairport group by airports.city order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select airports.city from airports join flights on airports.airportname = flights.sourceairport group by airports.city order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "question": "Which city is the most frequent source airport?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT City FROM airports GROUP BY City ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of City in airports table', 'Step 2: find City of airports table with largest value in the results of step 1']", "feedback": "you need to ensure that city should be of a source airportiations in flights.", "context": "Which city is the most frequent source airport? || select city from airports group by city order by count ( * ) desc limit 1 || flight_2 | airports : city, airportname | flights : sourceairport || you need to ensure that city should be of a source airportiations in flights.", "label": "flight_2 | select airports.city from airports join flights on airports.airportcode = flights.sourceairport group by airports.city order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select count ( * ) from airports join flights on airports.airportname = flights.destairport join airports on flights.airport = airports.airportname where airports.city = 'Aberdeen' or airports.city = 'Abilene'", "gold_parse": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", "question": "How many flights land in Aberdeen or Abilene?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE AirportName = \"Aberdeen\" OR City = \"Abilene\"", "predicted_parse_explanation": "['find the number of rows in airports table whose AirportName equals Aberdeen or City equals Abilene']", "feedback": "Substitute airports table with flights table and airport name with city .", "context": "How many flights land in Aberdeen or Abilene? || select count ( * ) from airports where airportname = 'Aberdeen' or city = 'Abilene' || flight_2 | airports : airportname, city ( \"Abilene\" ) | flights : destairport, airport | airports : airportname, city ( \"Aberdeen\" ) || Substitute airports table with flights table and airport name with city.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen' or airports.city = 'Abilene'" }, { "prediction": "world_1 | select country.region from city join country on city.district = country.code where city.name = 'Kabul'", "gold_parse": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", "question": "Which region is the city Kabul located in?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT LocalName FROM country WHERE Region = \"Kabul\"", "predicted_parse_explanation": "['find the LocalName of country table for which Region equals Kabul']", "feedback": "you need to put region in place of local name and name of city rather than region.", "context": "Which region is the city Kabul located in? || select localname from country where region = 'Kabul' || world_1 | country : region, code | city : district, name ( \"Kabul\" ) || you need to put region in place of local name and name of city rather than region.", "label": "world_1 | select region from country join city on country.code = city.countrycode where city.name = 'Kabul'" }, { "prediction": "student_transcripts_tracking | select students.first_name from addresses join students on addresses.address_id = students.permanent_address_id", "gold_parse": "SELECT first_name FROM Students WHERE current_address_id != permanent_address_id", "question": "Whose permanent address is different from his or her current address? List his or her first name.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT first_name FROM Students UNION SELECT first_name FROM Students", "predicted_parse_explanation": "['Step 1: find the first_name of Students table', 'Step 2: find the first_name of Students table', 'Step 3: show the rows that are in any of the results of step 1 or the results of step 2']", "feedback": "Search first name of student whose permanent address id is not same as current address id .", "context": "Whose permanent address is different from his or her current address? List his or her first name. || select first_name from students union select first_name from students || student_transcripts_tracking | students : first_name, permanent_address_id | addresses : address_id || Search first name of student whose permanent address id is not same as current address id.", "label": "student_transcripts_tracking | select first_name from students where current_address_id!= permanent_address_id" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Summer Show'", "gold_parse": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", "question": "How many paragraphs for the document with name 'Summer Show'?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Documents WHERE Document_Name = \"Summer Show\"", "predicted_parse_explanation": "['find the number of rows in Documents table whose Document_Name equals Summer Show']", "feedback": "Need to use paragraphs table in place of documents table.", "context": "How many paragraphs for the document with name 'Summer Show'? || select count ( * ) from documents where document_name = 'Summer Show' || cre_Doc_Template_Mgt | paragraphs : document_id | documents : document_id, document_name ( \"Summer Show\" ) || Need to use paragraphs table in place of documents table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Summer Show'" }, { "prediction": "dog_kennels | select treatments.date_of_treatment, professionals.first_name from treatments join patients on treatments.professional_id = patients.professional_id", "gold_parse": "SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id", "question": "What are the date and the operating professional's first name of each treatment?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT first_name , first_name FROM Professionals", "predicted_parse_explanation": "['find the first_name, first_name of Professionals table']", "feedback": "Find date of treatment and first name of professionals table for each treatment id .", "context": "What are the date and the operating professional's first name of each treatment? || select first_name, first_name from professionals || dog_kennels | treatments : date_of_treatment, professional_id | professionals : first_name, role_code | patients : professional_id || Find date of treatment and first name of professionals table for each treatment id.", "label": "dog_kennels | select treatments.date_of_treatment, professionals.first_name from treatments join professionals on treatments.professional_id = professionals.professional_id" }, { "prediction": "car_1 | select countries.countryid, countries.countryname from countries join car_makers on countries.countryid = car_makers.country where car_makers.maker = 'fiat' group by countries.countryid having count ( * ) > 3", "gold_parse": "SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING count(*) > 3 UNION SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WHERE T3.Model = 'fiat'", "question": "What are the ids and names of all countries that either have more than 3 car makers or produce fiats?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT CountryId , CountryName FROM countries GROUP BY CountryId HAVING Count ( * ) > \"fiat\" UNION SELECT CountryId , CountryName FROM countries GROUP BY CountryId HAVING Count ( * ) > 3", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of CountryId in countries table', 'Step 2: find CountryId, CountryName in countries table whose corresponding value in step 1 is greater than fiat', 'Step 3: find CountryId, CountryName in countries table whose corresponding value in step 1 is greater than 3', 'Step 4: show the rows that are in any of the results of step 2 or the results of step 4']", "feedback": "Remove \"is greater than fiat\" , Ensure maker equals fiat instep 2 , Show the result of step 2 and step 3.", "context": "What are the ids and names of all countries that either have more than 3 car makers or produce fiats? || select countryid, countryname from countries group by countryid having count ( * ) > 'fiat' union select countryid, countryname from countries group by countryid having count ( * ) > 3 || car_1 | countries : countryid, countryname | car_makers : country, maker ( \"fiat\" ) || Remove \"is greater than fiat\", Ensure maker equals fiat instep 2, Show the result of step 2 and step 3.", "label": "car_1 | select countries.countryid, countries.countryname from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) > 3 union select countries.countryid, countries.countryname from countries join car_makers on countries.countryid = car_makers.country join model_list on car_makers.id = model_list.maker where model_list.model = 'fiat'" }, { "prediction": "real_estate_properties | select property_name from properties where property_type_code = 'House' or property_type_code = 'Apartment' where room_count > 1", "gold_parse": "SELECT property_name FROM Properties WHERE property_type_code = \"House\" UNION SELECT property_name FROM Properties WHERE property_type_code = \"Apartment\" AND room_count > 1", "question": "What are the names of properties that are either houses or apartments with more than 1 room?", "db_id": "real_estate_properties", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Feature_Types", "Ref_Property_Types", "Other_Available_Features", "Properties", "Other_Property_Features" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4 ], "column_name": [ "*", "feature_type_code", "feature_type_name", "property_type_code", "property_type_description", "feature_id", "feature_type_code", "feature_name", "feature_description", "property_id", "property_type_code", "date_on_market", "date_sold", "property_name", "property_address", "room_count", "vendor_requested_price", "buyer_offered_price", "agreed_selling_price", "apt_feature_1", "apt_feature_2", "apt_feature_3", "fld_feature_1", "fld_feature_2", "fld_feature_3", "hse_feature_1", "hse_feature_2", "hse_feature_3", "oth_feature_1", "oth_feature_2", "oth_feature_3", "shp_feature_1", "shp_feature_2", "shp_feature_3", "other_property_details", "property_id", "feature_id", "property_feature_description" ] }, "db_foreign_keys": { "column_id": [ 6, 10, 35, 36 ], "other_column_id": [ 1, 3, 9, 5 ] }, "predicted_parse_with_values": "SELECT property_name FROM Properties WHERE room_count > 1", "predicted_parse_explanation": "['find the property_name of Properties table for which room_count greater than 1']", "feedback": "Be assured to look for code of property type which are equivalent to houses or apartments alone.", "context": "What are the names of properties that are either houses or apartments with more than 1 room? || select property_name from properties where room_count > 1 || real_estate_properties | properties : property_name, property_type_code ( \"Apartment\" ), room_count ( 1 ) || Be assured to look for code of property type which are equivalent to houses or apartments alone.", "label": "real_estate_properties | select property_name from properties where property_type_code = 'House' union select property_name from properties where property_type_code = 'Apartment' and room_count > 1" }, { "prediction": "flight_2 | select flightno from flights where sourceairport = 'APG'", "gold_parse": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"", "question": "Give the flight numbers of flights landing at APG.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T2.FlightNo FROM airlines AS T1 JOIN flights AS T2 WHERE T1.Abbreviation = \"APG\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in flights table', 'Step 2: find FlightNo of the results of step 1 whose Abbreviation equals APG']", "feedback": "in step 2, use destination airport instead of abbreviation.", "context": "Give the flight numbers of flights landing at APG. || select flights.flightno from airlines join flights where airlines.abbreviation = 'APG' || flight_2 | flights : flightno, sourceairport ( \"APG\" ) || in step 2, use destination airport instead of abbreviation.", "label": "flight_2 | select flightno from flights where destairport = 'APG'" }, { "prediction": "flight_2 | select flightno from flights where sourceairport = 'APG'", "gold_parse": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"", "question": "Give the flight numbers of flights leaving from APG.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T2.FlightNo FROM airlines AS T1 JOIN flights AS T2 WHERE T1.Abbreviation = \"APG\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in flights table', 'Step 2: find FlightNo of the results of step 1 whose Abbreviation equals APG']", "feedback": "abbreviation is wrong . Take source airport in place of it .", "context": "Give the flight numbers of flights leaving from APG. || select flights.flightno from airlines join flights where airlines.abbreviation = 'APG' || flight_2 | flights : flightno, sourceairport ( \"APG\" ) || abbreviation is wrong. Take source airport in place of it.", "label": "flight_2 | select flightno from flights where sourceairport = 'APG'" }, { "prediction": "dog_kennels | select breeds.breed_name from breeds join dogs on breeds.breed_code = dogs.breed_code group by breeds.breed_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the breed with the most dogs?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code ORDER BY T2.weight Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Breeds table, find the corresponding rows in Dogs table', 'Step 2: find breed_name of the results of step 1 with largest value of weight']", "feedback": "You need to use the breed code whose count is highest.", "context": "What is the name of the breed with the most dogs? || select breeds.breed_name from breeds join dogs on breeds.breed_code = dogs.breed_code order by dogs.weight desc limit 1 || dog_kennels | breeds : breed_name, breed_code | dogs : breed_code || You need to use the breed code whose count is highest.", "label": "dog_kennels | select breeds.breed_name from breeds join dogs on breeds.breed_code = dogs.breed_code group by breeds.breed_name order by count ( * ) desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select document_id, count ( * ) from paragraphs group by document_id order by count ( * ) asc", "gold_parse": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", "question": "Show all document ids and the number of paragraphs in each document. Order by document id.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID , Count ( * ) FROM Paragraphs GROUP BY Document_ID ORDER BY Count ( * ) Asc", "predicted_parse_explanation": "['Step 1: for each value of Document_ID in Paragraphs table, calculate number of rows', 'Step 2: show each value of Document_ID in Paragraphs table along with the corresponding number of rows ordered ascending by the results of step 1']", "feedback": "order by document id", "context": "Show all document ids and the number of paragraphs in each document. Order by document id. || select document_id, count ( * ) from paragraphs group by document_id order by count ( * ) asc || cre_Doc_Template_Mgt | paragraphs : document_id || order by document id", "label": "cre_Doc_Template_Mgt | select document_id, count ( * ) from paragraphs group by document_id order by document_id asc" }, { "prediction": "cre_Doc_Template_Mgt | select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland'", "gold_parse": "SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'", "question": "What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID FROM Documents WHERE Document_Name LIKE \"Ireland\"", "predicted_parse_explanation": "['find the Document_ID of Documents table for which Document_Name contains Ireland']", "feedback": "Replace document name contains Ireland\" with paragraph text equals Brazil and Ireland .", "context": "What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'? || select document_id from documents where document_name like 'Ireland' || cre_Doc_Template_Mgt | paragraphs : document_id, paragraph_text ( \"Ireland\" ) || Replace document name contains Ireland\" with paragraph text equals Brazil and Ireland.", "label": "cre_Doc_Template_Mgt | select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland'" }, { "prediction": "employee_hire_evaluation | select manager_name, district from shop order by number_products desc limit 1", "gold_parse": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1", "question": "Find the manager name and district of the shop whose number of products is the largest.", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT T1.Name , T1.District FROM shop AS T1 JOIN hiring AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T2.Shop_ID ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in shop table, find the corresponding rows in hiring table', \"Step 2: find the number of rows of each value of hiring's Shop_ID in the results of step 1\", 'Step 3: find Name, District of step 1 results with largest value in the results of step 2']", "feedback": "You should use name of manager and products number.", "context": "Find the manager name and district of the shop whose number of products is the largest. || select shop.name, shop.district from shop join hiring on shop.shop_id = hiring.shop_id group by hiring.shop_id order by count ( * ) desc limit 1 || employee_hire_evaluation | shop : manager_name, district, number_products || You should use name of manager and products number.", "label": "employee_hire_evaluation | select manager_name, district from shop order by number_products desc limit 1" }, { "prediction": "wta_1 | select count ( * ) from matches", "gold_parse": "SELECT count(*) FROM matches", "question": "Count the number of matches.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM players", "predicted_parse_explanation": "['find the number of rows in players table']", "feedback": "Put matches table in place of players table .", "context": "Count the number of matches. || select count ( * ) from players || wta_1 | matches : || Put matches table in place of players table.", "label": "wta_1 | select count ( * ) from matches" }, { "prediction": "dog_kennels | select treatment_types.treatment_type_description from treatment_types join treatments on treatment_types.treatment_type_code = treatments.treatment_type_code order by treatments.cost_of_treatment asc limit 1", "gold_parse": "SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1", "question": "Give me the description of the treatment type whose total cost is the lowest.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.treatment_type_description FROM Charges AS T1 JOIN Treatment_Types AS T2 JOIN Treatments AS T3 GROUP BY T3.treatment_type_code ORDER BY Avg ( T1.charge_amount ) Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Charges table, find corresponding rows in Treatment_Types table and in Treatments table', \"Step 2: find the average charge_amount of each value of Treatments's treatment_type_code in the results of step 1\", 'Step 3: find treatment_type_description of the results of step 1 with smallest value in the results of step 2']", "feedback": "The average charge amount should be replaced by total cost of treatment .", "context": "Give me the description of the treatment type whose total cost is the lowest. || select treatment_types.treatment_type_description from charges join treatment_types join treatments group by treatments.treatment_type_code order by avg ( charges.charge_amount ) asc limit 1 || dog_kennels | treatment_types : treatment_type_description, treatment_type_code | treatments : treatment_type_code, cost_of_treatment || The average charge amount should be replaced by total cost of treatment.", "label": "dog_kennels | select treatment_types.treatment_type_description from treatment_types join treatments on treatment_types.treatment_type_code = treatments.treatment_type_code group by treatment_types.treatment_type_code order by sum ( cost_of_treatment ) asc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select template_id, version_number, template_type_code from templates", "gold_parse": "SELECT template_id , version_number , template_type_code FROM Templates", "question": "What are the ids, version numbers, and type codes for each template?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_ID , Version_Number , Template_Type_Code , Template_Type_Code FROM Templates", "predicted_parse_explanation": "['find the Template_ID, Version_Number, Template_Type_Code, Template_Type_Code of Templates table']", "feedback": "Omit one of the \"Template Type Code\".", "context": "What are the ids, version numbers, and type codes for each template? || select template_id, version_number, template_type_code, template_type_code from templates || cre_Doc_Template_Mgt | templates : template_id, version_number, template_type_code || Omit one of the \"Template Type Code\".", "label": "cre_Doc_Template_Mgt | select template_id, version_number, template_type_code from templates" }, { "prediction": "wta_1 | select loser_name, winner_name from matches order by minutes desc limit 1", "gold_parse": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1", "question": "find the names of loser and winner who played in the match with greatest number of minutes.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT tourney_name , loser_entry FROM matches ORDER BY minutes Desc LIMIT 1", "predicted_parse_explanation": "['find the tourney_name, loser_entry of matches table with largest value of minutes']", "feedback": "You should use name of winner and loser.", "context": "find the names of loser and winner who played in the match with greatest number of minutes. || select tourney_name, loser_entry from matches order by minutes desc limit 1 || wta_1 | matches : loser_name, winner_name, minutes || You should use name of winner and loser.", "label": "wta_1 | select winner_name, loser_name from matches order by minutes desc limit 1" }, { "prediction": "network_1 | select distinct grade from highschooler", "gold_parse": "SELECT grade FROM Highschooler", "question": "Show all the grades of the high schoolers.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT DISTINCT grade FROM Highschooler WHERE grade = 9", "predicted_parse_explanation": "['find without repetition the grade of Highschooler table for which grade equals 9']", "feedback": "Remove \"for which grade equals 9\" phrase .", "context": "Show all the grades of the high schoolers. || select distinct grade from highschooler where grade = 9 || network_1 | highschooler : grade || Remove \"for which grade equals 9\" phrase.", "label": "network_1 | select grade from highschooler" }, { "prediction": "car_1 | select count ( * ) from car_makers where country = 'france'", "gold_parse": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france'", "question": "How many car makers are there in france?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM car_makers WHERE Country = \"france\"", "predicted_parse_explanation": "['find the number of rows in car_makers table whose Country equals france']", "feedback": "Use corresponding countries's country name instead of country .", "context": "How many car makers are there in france? || select count ( * ) from car_makers where country = 'france' || car_1 | car_makers : country ( \"france\" ) || Use corresponding countries's country name instead of country.", "label": "car_1 | select count ( * ) from car_makers join countries on car_makers.country = countries.countryid where countries.countryname = 'france'" }, { "prediction": "world_1 | select language from countrylanguage group by countrycode order by count ( * ) desc limit 1", "gold_parse": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1", "question": "Give the language that is spoken in the most countries.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country GROUP BY Continent ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Continent in country table', 'Step 2: find Name of country table with largest value in the results of step 1']", "feedback": "Find language of countrylanguage table whose largest value of language .", "context": "Give the language that is spoken in the most countries. || select name from country group by continent order by count ( * ) desc limit 1 || world_1 | countrylanguage : language, countrycode || Find language of countrylanguage table whose largest value of language.", "label": "world_1 | select language from countrylanguage group by language order by count ( * ) desc limit 1" }, { "prediction": "dog_kennels | select owners.owner_id, owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id order by treatments.cost_of_treatment desc limit 1", "gold_parse": "SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "question": "Tell me the owner id and last name of the owner who spent the most on treatments of his or her dogs.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT owner_id , last_name FROM Owners GROUP BY owner_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of owner_id in Owners table', 'Step 2: find owner_id, last_name of Owners table with largest value in the results of step 1']", "feedback": "In step 1 Need to find Treatments's dog id which present in Dogs's dog id .", "context": "Tell me the owner id and last name of the owner who spent the most on treatments of his or her dogs. || select owner_id, last_name from owners group by owner_id order by count ( * ) desc limit 1 || dog_kennels | owners : owner_id, last_name | dogs : owner_id, dog_id | treatments : dog_id, cost_of_treatment || In step 1 Need to find Treatments's dog id which present in Dogs's dog id.", "label": "dog_kennels | select owners.owner_id, owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id group by owners.owner_id order by count ( * ) desc limit 1" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.grade = friend.student_id where highschooler.grade > 5 group by friend.student_id having count ( * ) >= 2", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2", "question": "What are the names of high schoolers who have a grade of over 5 and have 2 or more friends?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler WHERE grade > 2 INTERSECT SELECT name FROM Highschooler WHERE grade < 5", "predicted_parse_explanation": "['Step 1: find the name of Highschooler table for which grade greater than 2', 'Step 2: find the name of Highschooler table for which grade less than 5', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "I want student id of friends table which is 2 or more in step 2 and use 5 instead of 2.", "context": "What are the names of high schoolers who have a grade of over 5 and have 2 or more friends? || select name from highschooler where grade > 2 intersect select name from highschooler where grade < 5 || network_1 | highschooler : name, grade ( 5 ) | friend : student_id || I want student id of friends table which is 2 or more in step 2 and use 5 instead of 2.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id where highschooler.grade > 5 group by friend.student_id having count ( * ) >= 2" }, { "prediction": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.headofstate = 'Beatrix'", "gold_parse": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\" AND T2.IsOfficial = \"T\"", "question": "What is the official language spoken in the country whose head of state is Beatrix?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Code2 FROM country WHERE Continent = \"Beatrix\"", "predicted_parse_explanation": "['find the Code2 of country table for which Continent equals Beatrix']", "feedback": "Substitute code 2 with language , country with countrylanguage , continent with country's head of state , Ensure is official equals T .", "context": "What is the official language spoken in the country whose head of state is Beatrix? || select code2 from country where continent = 'Beatrix' || world_1 | countrylanguage : language, countrycode | country : code, headofstate ( \"Beatrix\" ) || Substitute code 2 with language, country with countrylanguage, continent with country's head of state, Ensure is official equals T.", "label": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.headofstate = 'Beatrix' and countrylanguage.isofficial = 'T'" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1", "question": "What airline serves the most flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines GROUP BY Abbreviation ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Abbreviation in airlines table', 'Step 2: find Airline of airlines table with largest value in the results of step 1']", "feedback": "Exchange abbreviation in airlines table with airline in flights table .", "context": "What airline serves the most flights? || select airline from airlines group by abbreviation order by count ( * ) desc limit 1 || flight_2 | airlines : airline, uid | flights : airline || Exchange abbreviation in airlines table with airline in flights table.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) desc limit 1" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id having count ( * ) >= 3", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3", "question": "Show the names of high schoolers who have at least 3 friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler GROUP BY grade HAVING Count ( * ) > = 3", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of grade in Highschooler table', 'Step 2: find name in Highschooler table whose corresponding value in step 1 is greater than or equals 3']", "feedback": "Replace grade in high schooler table with student id in friend table in step 1.", "context": "Show the names of high schoolers who have at least 3 friends. || select name from highschooler group by grade having count ( * ) > = 3 || network_1 | highschooler : name, id | friend : student_id || Replace grade in high schooler table with student id in friend table in step 1.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id having count ( * ) >= 3" }, { "prediction": "flight_2 | select count ( * ) from flights join airports on flights.sourceairport = airports.city where airports.city = 'Aberdeen' or airports.city = 'Abilene'", "gold_parse": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", "question": "Find the number of flights landing in the city of Aberdeen or Abilene.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE City = \"Abilene\" OR City = \"Aberdeen\"", "predicted_parse_explanation": "['find the number of rows in airports table whose City equals Aberdeen or City equals Abilene']", "feedback": "flights table should be use in place of airports table .", "context": "Find the number of flights landing in the city of Aberdeen or Abilene. || select count ( * ) from airports where city = 'Abilene' or city = 'Aberdeen' || flight_2 | flights : sourceairport | airports : city ( \"Abilene\" ) || flights table should be use in place of airports table.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen' or airports.city = 'Abilene'" }, { "prediction": "dog_kennels | select dogs.date_arrived, dogs.date_departed from treatments join dogs on treatments.dog_id = dogs.dog_id", "gold_parse": "SELECT DISTINCT T1.date_arrived , T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id", "question": "Find the arriving date and the departing date of the dogs that received a treatment.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT date_departed , date_of_birth FROM Dogs WHERE gender = 1", "predicted_parse_explanation": "['find the date_departed, date_of_birth of Dogs table for which gender equals 1']", "feedback": "you need to determine the dog's date departed, date arrived for the dogs whose id's are present in the treatment table.", "context": "Find the arriving date and the departing date of the dogs that received a treatment. || select date_departed, date_of_birth from dogs where gender = 1 || dog_kennels | dogs : date_arrived, date_departed, dog_id | treatments : dog_id || you need to determine the dog's date departed, date arrived for the dogs whose id's are present in the treatment table.", "label": "dog_kennels | select distinct dogs.date_arrived, dogs.date_departed from dogs join treatments on dogs.dog_id = treatments.dog_id" }, { "prediction": "student_transcripts_tracking | select count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id where departments.department_name = 'engineer'", "gold_parse": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", "question": "How many degrees does the engineering department have?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Departments WHERE department_name = \"engineer\"", "predicted_parse_explanation": "['find the number of rows in Departments table whose department_name equals engineer']", "feedback": "Make sure to search the rows count from degree program table.", "context": "How many degrees does the engineering department have? || select count ( * ) from departments where department_name = 'engineer' || student_transcripts_tracking | departments : department_id, department_name ( \"engineer\" ) | degree_programs : department_id || Make sure to search the rows count from degree program table.", "label": "student_transcripts_tracking | select count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id where departments.department_name = 'engineer'" }, { "prediction": "pets_1 | select fname, age from student where stuid in ( select stuid from has_pet join pets on has_pet.petid = pets.petid where pets.pettype = 'Dog' except select stuid from has_pet join student on has_pet.petid = student.stuid where pets.pettype = 'Cat' )", "gold_parse": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "question": "Find the first name and age of students who have a dog but do not have a cat as a pet.", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT T1.Fname , T1.Age FROM Student AS T1 WHERE T1.StuID NOT IN ( SELECT T2.StuID FROM Has_Pet AS T2 )", "predicted_parse_explanation": "['Step 1: find the StuID of Has_Pet table', \"Step 2: find the Fname, Age of Student table whose Student's StuID not one of the results of step 1\"]", "feedback": "In step 2 find for student id whose corresponding Pets's pet type equals dog and not equals cat .", "context": "Find the first name and age of students who have a dog but do not have a cat as a pet. || select student.fname, student.age from student where student.stuid not in ( select has_pet.stuid from has_pet ) || pets_1 | student : fname, age, stuid | has_pet : stuid, petid | pets : petid, pettype ( \"Cat\" ) || In step 2 find for student id whose corresponding Pets's pet type equals dog and not equals cat.", "label": "pets_1 | select student.fname, student.age from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog' and student.stuid not in ( select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' )" }, { "prediction": "world_1 | select city.district from city join country on city.district = country.code where city.name = 'Kabul'", "gold_parse": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", "question": "What region is Kabul in?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT LocalName FROM country", "predicted_parse_explanation": "['find the LocalName of country table']", "feedback": "make sure corresponding name of the city is kabul and interchange local name with region.", "context": "What region is Kabul in? || select localname from country || world_1 | city : district, name ( \"Kabul\" ) | country : region, code || make sure corresponding name of the city is kabul and interchange local name with region.", "label": "world_1 | select region from country join city on country.code = city.countrycode where city.name = 'Kabul'" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO' except select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"", "question": "Which airlines have departures from CVO but not from APG airports?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.Airline FROM airlines AS T1 WHERE T1.Country = \"CVO\" EXCEPT SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"APG\"", "predicted_parse_explanation": "[\"Step 1: find the Airline of airlines table for which airlines's Country equals CVO\", 'Step 2: For each row in airlines table, find the corresponding rows in airports table', \"Step 3: find Airline of the results of step 2 whose airports's Country equals APG\", 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "from airlines country is incorrect, swap country of airports table with source airport of flight table .", "context": "Which airlines have departures from CVO but not from APG airports? || select airlines.airline from airlines where airlines.country = 'CVO' except select airlines.airline from airlines join airports where airports.country = 'APG' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"APG\" ) || from airlines country is incorrect, swap country of airports table with source airport of flight table.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO' except select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG'" }, { "prediction": "car_1 | select min ( weight ) from cars_data where cylinders = 8 and year = 1974", "gold_parse": "SELECT Weight FROM CARS_DATA WHERE Cylinders = 4 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1", "question": "What is the minimu weight of the car with 8 cylinders produced in 1974?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Min ( Weight ) FROM cars_data WHERE Year = 1", "predicted_parse_explanation": "['find the minimum Weight in cars_data table whose Year equals 1']", "feedback": "make sure year should be 1974 and cylinders equivalent with 8.", "context": "What is the minimu weight of the car with 8 cylinders produced in 1974? || select min ( weight ) from cars_data where year = 1 || car_1 | cars_data : weight, cylinders ( 8 ), year ( 1974 ) || make sure year should be 1974 and cylinders equivalent with 8.", "label": "car_1 | select weight from cars_data where cylinders = 4 and year = 1974 order by weight asc limit 1" }, { "prediction": "poker_player | select people.name from people join poker_player on people.people_id = poker_player.people_id", "gold_parse": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", "question": "What are the names of poker players?", "db_id": "poker_player", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "poker_player", "people" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Poker_Player_ID", "People_ID", "Final_Table_Made", "Best_Finish", "Money_Rank", "Earnings", "People_ID", "Nationality", "Name", "Birth_Date", "Height" ] }, "db_foreign_keys": { "column_id": [ 2 ], "other_column_id": [ 7 ] }, "predicted_parse_with_values": "SELECT Name FROM people", "predicted_parse_explanation": "['find the Name of people table']", "feedback": "In poker player table, you need to mention the people's people Id.", "context": "What are the names of poker players? || select name from people || poker_player | people : name, people_id | poker_player : people_id || In poker player table, you need to mention the people's people Id.", "label": "poker_player | select people.name from people join poker_player on people.people_id = poker_player.people_id" }, { "prediction": "concert_singer | select name, capacity from stadium order by avg ( average ) desc limit 1", "gold_parse": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1", "question": "What is the name and capacity for the stadium with highest average attendance?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Name , Capacity FROM stadium GROUP BY Stadium_ID ORDER BY Avg ( Average ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the average Average of each value of Stadium_ID in stadium table', 'Step 2: find Name, Capacity of stadium table with largest value in the results of step 1']", "feedback": "I only want average from step 1.", "context": "What is the name and capacity for the stadium with highest average attendance? || select name, capacity from stadium group by stadium_id order by avg ( average ) desc limit 1 || concert_singer | stadium : name, capacity, average || I only want average from step 1.", "label": "concert_singer | select name, capacity from stadium order by average desc limit 1" }, { "prediction": "battle_death | select death.injured, death.caused_by_ship_id from ship join death on ship.id = death.caused_by_ship_id where ship.tonnage = 't'", "gold_parse": "SELECT T1.killed , T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id WHERE T2.tonnage = 't'", "question": "What are the death and injury situations caused by the ship with tonnage 't'?", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT T2.note , T2.killed FROM ship AS T1 JOIN death AS T2 ON T1.id = T2.caused_by_ship_id WHERE T1.tonnage = \"t\"", "predicted_parse_explanation": "['Step 1: For each row in ship table, find the corresponding rows in death table', 'Step 2: find note, killed of the results of step 1 whose tonnage equals t']", "feedback": "I want the injured in-place of note. ", "context": "What are the death and injury situations caused by the ship with tonnage 't'? || select death.note, death.killed from ship join death on ship.id = death.caused_by_ship_id where ship.tonnage = 't' || battle_death | death : injured, caused_by_ship_id | ship : id, tonnage ( \"t\" ) || I want the injured in-place of note.", "label": "battle_death | select death.killed, death.injured from death join ship on death.caused_by_ship_id = ship.id where ship.tonnage = 't'" }, { "prediction": "orchestra | select name from conductor order by year_of_work desc limit 1", "gold_parse": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1", "question": "What is the name of the conductor who has worked the greatest number of years?", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID ORDER BY T2.Year_of_Founded Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in conductor table, find the corresponding rows in orchestra table', 'Step 2: find Name of the results of step 1 with largest value of Year_of_Founded']", "feedback": "In step 2, you should use work year instead of founded year.", "context": "What is the name of the conductor who has worked the greatest number of years? || select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id order by orchestra.year_of_founded desc limit 1 || orchestra | conductor : name, year_of_work || In step 2, you should use work year instead of founded year.", "label": "orchestra | select name from conductor order by year_of_work desc limit 1" }, { "prediction": "dog_kennels | select treatments.cost_of_treatment, treatment_types.treatment_type_description from treatments join treatment_types on treatments.treatment_type_code = treatment_types.treatment_type_code", "gold_parse": "SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code", "question": "What are the cost and treatment type description of each treatment?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT treatment_type_description , treatment_type_code FROM Treatment_Types", "predicted_parse_explanation": "['find the treatment_type_description, treatment_type_code of Treatment_Types table']", "feedback": "I want date of treatment and it is okay if you don't find treatment type code.", "context": "What are the cost and treatment type description of each treatment? || select treatment_type_description, treatment_type_code from treatment_types || dog_kennels | treatments : cost_of_treatment, treatment_type_code | treatment_types : treatment_type_description, treatment_type_code || I want date of treatment and it is okay if you don't find treatment type code.", "label": "dog_kennels | select treatments.cost_of_treatment, treatment_types.treatment_type_description from treatments join treatment_types on treatments.treatment_type_code = treatment_types.treatment_type_code" }, { "prediction": "tvshow | select country from tv_channel where id not in ( select channel from cartoon where written_by = 'Todd Casey' )", "gold_parse": "SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "question": "which countries' tv channels are not playing any cartoon written by Todd Casey?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Michael Jelenic\" EXCEPT SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Todd Casey\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find Country of the results of step 1 whose Written_by equals Michael Jelenic', 'Step 3: find Country of the results of step 1 whose Written_by equals Todd Casey', 'Step 4: show the rows that are in the results of step 2 but not in the results of step 3']", "feedback": "Remove written by equals Michael Jelenic in step 2", "context": "which countries' tv channels are not playing any cartoon written by Todd Casey? || select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Michael Jelenic' except select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey' || tvshow | tv_channel : country, id | cartoon : channel, written_by ( \"Todd Casey\" ) || Remove written by equals Michael Jelenic in step 2", "label": "tvshow | select country from tv_channel except select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" }, { "prediction": "real_estate_properties | select ref_property_types.property_type_description from ref_property_types join properties on ref_property_types.property_type_code = properties.property_type_code", "gold_parse": "SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code", "question": "Show the property type descriptions of properties belonging to that code.", "db_id": "real_estate_properties", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Feature_Types", "Ref_Property_Types", "Other_Available_Features", "Properties", "Other_Property_Features" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4 ], "column_name": [ "*", "feature_type_code", "feature_type_name", "property_type_code", "property_type_description", "feature_id", "feature_type_code", "feature_name", "feature_description", "property_id", "property_type_code", "date_on_market", "date_sold", "property_name", "property_address", "room_count", "vendor_requested_price", "buyer_offered_price", "agreed_selling_price", "apt_feature_1", "apt_feature_2", "apt_feature_3", "fld_feature_1", "fld_feature_2", "fld_feature_3", "hse_feature_1", "hse_feature_2", "hse_feature_3", "oth_feature_1", "oth_feature_2", "oth_feature_3", "shp_feature_1", "shp_feature_2", "shp_feature_3", "other_property_details", "property_id", "feature_id", "property_feature_description" ] }, "db_foreign_keys": { "column_id": [ 6, 10, 35, 36 ], "other_column_id": [ 1, 3, 9, 5 ] }, "predicted_parse_with_values": "SELECT property_type_description FROM Ref_Property_Types", "predicted_parse_explanation": "['find the property_type_description of Ref_Property_Types table']", "feedback": "Also add property type code .", "context": "Show the property type descriptions of properties belonging to that code. || select property_type_description from ref_property_types || real_estate_properties | ref_property_types : property_type_description, property_type_code | properties : property_type_code || Also add property type code.", "label": "real_estate_properties | select ref_property_types.property_type_description from properties join ref_property_types on properties.property_type_code = ref_property_types.property_type_code group by properties.property_type_code" }, { "prediction": "wta_1 | select players.first_name, players.country_code from players join rankings on players.player_id = rankings.player_id group by players.player_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1", "question": "Find the first name and country code of the player who did the most number of tours.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.country_code FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T2.loser_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find the number of rows of each value of loser_id in the results of step 1', 'Step 3: find first_name, country_code of step 1 results with largest value in the results of step 2']", "feedback": "In step 1, you should use rankings in place of matches and in the step 2, you need to determine the tour's ranking.", "context": "Find the first name and country code of the player who did the most number of tours. || select players.first_name, players.country_code from players join matches on players.player_id = matches.loser_id group by matches.loser_id order by count ( * ) desc limit 1 || wta_1 | players : first_name, country_code, player_id | rankings : player_id || In step 1, you should use rankings in place of matches and in the step 2, you need to determine the tour's ranking.", "label": "wta_1 | select players.country_code, players.first_name from players join rankings on players.player_id = rankings.player_id order by rankings.tours desc limit 1" }, { "prediction": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.headofstate = 'Beatrix'", "gold_parse": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\" AND T2.IsOfficial = \"T\"", "question": "What is the official language used in the country the name of whose head of state is Beatrix.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country WHERE Continent = \"Beatrix\"", "predicted_parse_explanation": "['find the Name of country table for which Continent equals Beatrix']", "feedback": "Replace name name , country table , continent with language , countrylanguage table and head of state respectively . verify is official equals T .", "context": "What is the official language used in the country the name of whose head of state is Beatrix. || select name from country where continent = 'Beatrix' || world_1 | countrylanguage : language, countrycode | country : code, headofstate ( \"Beatrix\" ) || Replace name name, country table, continent with language, countrylanguage table and head of state respectively. verify is official equals T.", "label": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.headofstate = 'Beatrix' and countrylanguage.isofficial = 'T'" }, { "prediction": "car_1 | select avg ( mpg ) from cars_data where cylinders = 4", "gold_parse": "SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4", "question": "What is the average miles per gallon(mpg) of the cars with 4 cylinders?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Avg ( Accelerate ) FROM cars_data WHERE Cylinders = 4", "predicted_parse_explanation": "['find the average Accelerate in cars_data table whose Cylinders equals 4']", "feedback": "you need to replace accelerate with mpg.", "context": "What is the average miles per gallon(mpg) of the cars with 4 cylinders? || select avg ( accelerate ) from cars_data where cylinders = 4 || car_1 | cars_data : mpg, cylinders ( 4 ) || you need to replace accelerate with mpg.", "label": "car_1 | select avg ( mpg ) from cars_data where cylinders = 4" }, { "prediction": "tvshow | select country from tv_channel where id not in ( select channel from cartoon where written_by = 'Todd Casey' )", "gold_parse": "SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "question": "which countries' tv channels are not playing any cartoon written by Todd Casey?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Michael Jelenic\" EXCEPT SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Todd Casey\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find Country of the results of step 1 whose Written_by equals Michael Jelenic', 'Step 3: find Country of the results of step 1 whose Written_by equals Todd Casey', 'Step 4: show the rows that are in the results of step 2 but not in the results of step 3']", "feedback": "In step 2, You should drop written by whose value is Michael Jelenic.", "context": "which countries' tv channels are not playing any cartoon written by Todd Casey? || select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Michael Jelenic' except select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey' || tvshow | tv_channel : country, id | cartoon : channel, written_by ( \"Todd Casey\" ) || In step 2, You should drop written by whose value is Michael Jelenic.", "label": "tvshow | select country from tv_channel except select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" }, { "prediction": "car_1 | select count ( * ) from countries", "gold_parse": "SELECT count(*) FROM COUNTRIES", "question": "How many countries are listed?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM continents", "predicted_parse_explanation": "['find the number of rows in continents table']", "feedback": "Substitute countries table in place of continents table .", "context": "How many countries are listed? || select count ( * ) from continents || car_1 | countries : || Substitute countries table in place of continents table.", "label": "car_1 | select count ( * ) from countries" }, { "prediction": "dog_kennels | select avg ( dogs.age ) from treatments join dogs on treatments.dog_id = dogs.dog_id", "gold_parse": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", "question": "Find the average age of the dogs who went through treatments.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( age ) FROM Dogs", "predicted_parse_explanation": "['find the average age in Dogs table']", "feedback": "I want you to confirm that the dog id from dog table is available in treatments table.", "context": "Find the average age of the dogs who went through treatments. || select avg ( age ) from dogs || dog_kennels | dogs : age, dog_id | treatments : dog_id || I want you to confirm that the dog id from dog table is available in treatments table.", "label": "dog_kennels | select avg ( age ) from dogs where dog_id in ( select dog_id from treatments )" }, { "prediction": "student_transcripts_tracking | select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id", "gold_parse": "SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id", "question": "What are the names of all courses that have some students enrolled?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name FROM Courses", "predicted_parse_explanation": "['find the course_name of Courses table']", "feedback": "Id of course from course table should be available in course id of student enrolment course table.", "context": "What are the names of all courses that have some students enrolled? || select course_name from courses || student_transcripts_tracking | courses : course_name, course_id | student_enrolment_courses : course_id || Id of course from course table should be available in course id of student enrolment course table.", "label": "student_transcripts_tracking | select distinct courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id" }, { "prediction": "world_1 | select population, lifeexpectancy from country where name = 'Brazil'", "gold_parse": "SELECT Population , LifeExpectancy FROM country WHERE Name = \"Brazil\"", "question": "Give me Brazil\u2019s population and life expectancies.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Population , Continent FROM country", "predicted_parse_explanation": "['find the Population, Continent of country table']", "feedback": "i want life expectancy and make sure to search for name as brazil.", "context": "Give me Brazil\u2019s population and life expectancies. || select population, continent from country || world_1 | country : population, lifeexpectancy, name ( \"Brazil\" ) || i want life expectancy and make sure to search for name as brazil.", "label": "world_1 | select population, lifeexpectancy from country where name = 'Brazil'" }, { "prediction": "wta_1 | select players.first_name, players.country_code, players.birth_date from players join matches on players.player_id = matches.player_id order by matches.winner_rank_points asc limit 1", "gold_parse": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1", "question": "What is the first name, country code, and birth date of the player with the most winner rank points across all matches?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id ORDER BY T2.winner_rank Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find first_name, country_code, birth_date of the results of step 1 with smallest value of winner_rank']", "feedback": "You should supersede smallest value of winner rank with largest value of winner rank points.", "context": "What is the first name, country code, and birth date of the player with the most winner rank points across all matches? || select players.first_name, players.country_code, players.birth_date from players join matches on players.player_id = matches.loser_id order by matches.winner_rank asc limit 1 || wta_1 | players : first_name, country_code, birth_date, player_id | matches : player_id, winner_rank_points || You should supersede smallest value of winner rank with largest value of winner rank points.", "label": "wta_1 | select players.first_name, players.country_code, players.birth_date from players join matches on players.player_id = matches.winner_id order by matches.winner_rank_points desc limit 1" }, { "prediction": "car_1 | select avg ( cars_data.edispl ) from cars_data join model_list on cars_data.id = model_list.modelid where model_list.model = 'volvo'", "gold_parse": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo'", "question": "What is the average edispl of the cars of model volvo?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Avg ( Horsepower ) FROM cars_data WHERE Year = \"volvo\"", "predicted_parse_explanation": "['find the average Horsepower in cars_data table whose Year equals volvo']", "feedback": "replace average horsepower with average of edispl and use car names's model.", "context": "What is the average edispl of the cars of model volvo? || select avg ( horsepower ) from cars_data where year = 'volvo' || car_1 | cars_data : edispl, id | model_list : modelid, model ( \"volvo\" ) || replace average horsepower with average of edispl and use car names's model.", "label": "car_1 | select avg ( cars_data.edispl ) from car_names join cars_data on car_names.makeid = cars_data.id where car_names.model = 'volvo'" }, { "prediction": "world_1 | select avg ( gnp ), sum ( population ) from country where governmentform = 'US Territory'", "gold_parse": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"", "question": "What is the average GNP and total population in all nations whose government is US territory?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( GNP ) , Avg ( Population ) FROM country WHERE Continent = \"US Territory\"", "predicted_parse_explanation": "['find the average GNP and the average Population in country table whose Continent equals US Territory']", "feedback": "you should use total population instead of average population. also government form should be us territory not continent.", "context": "What is the average GNP and total population in all nations whose government is US territory? || select avg ( gnp ), avg ( population ) from country where continent = 'US Territory' || world_1 | country : gnp, population, governmentform ( \"US Territory\" ) || you should use total population instead of average population. also government form should be us territory not continent.", "label": "world_1 | select avg ( gnp ), sum ( population ) from country where governmentform = 'US Territory'" }, { "prediction": "flight_2 | select airports.city from airports join flights on airports.airportname = flights.sourceairport group by airports.city order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "question": "Which city is the most frequent source airport?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT City FROM airports GROUP BY City ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of City in airports table', 'Step 2: find City of airports table with largest value in the results of step 1']", "feedback": "The city must be of a source airport in flights", "context": "Which city is the most frequent source airport? || select city from airports group by city order by count ( * ) desc limit 1 || flight_2 | airports : city, airportname | flights : sourceairport || The city must be of a source airport in flights", "label": "flight_2 | select airports.city from airports join flights on airports.airportcode = flights.sourceairport group by airports.city order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Afghanistan'", "gold_parse": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", "question": "How many official languages are spoken in Afghanistan?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Code ) FROM country WHERE Continent = \"Afghanistan\"", "predicted_parse_explanation": "['find the number of different Code in country table whose Continent equals Afghanistan']", "feedback": "Search number of corresponding rows of countrylanguage for which country's name equals Afghanistan .", "context": "How many official languages are spoken in Afghanistan? || select count ( distinct code ) from country where continent = 'Afghanistan' || world_1 | countrylanguage : language, countrycode | country : code, name ( \"Afghanistan\" ) || Search number of corresponding rows of countrylanguage for which country's name equals Afghanistan.", "label": "world_1 | select count ( * ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Afghanistan' and isofficial = 'T'" }, { "prediction": "flight_2 | select count ( * ) from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "question": "Return the number of flights arriving in Aberdeen.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE City = \"Aberdeen\"", "predicted_parse_explanation": "['find the number of rows in airports table whose City equals Aberdeen']", "feedback": "Find number of rows of flights table whose destination airport corresponds to airports's city equals Aberdeen", "context": "Return the number of flights arriving in Aberdeen. || select count ( * ) from airports where city = 'Aberdeen' || flight_2 | flights : sourceairport, flightno | airports : airportcode, city ( \"Aberdeen\" ) || Find number of rows of flights table whose destination airport corresponds to airports's city equals Aberdeen", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen'" }, { "prediction": "student_transcripts_tracking | select first_name from students where permanent_address_id = ( select permanent_address_id from students where cell_mobile_number = '09700166582' )", "gold_parse": "SELECT T1.first_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.permanent_address_id = T2.address_id WHERE T2.country = 'Haiti' UNION SELECT first_name FROM Students WHERE cell_mobile_number = '09700166582'", "question": "What are the first names of the students who live in Haiti permanently or have the cell phone number 09700166582?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT first_name FROM Students WHERE cell_mobile_number LIKE \"Haiti\" UNION SELECT first_name FROM Students WHERE cell_mobile_number = 09700166582", "predicted_parse_explanation": "['Step 1: find the first_name of Students table for which cell_mobile_number contains Haiti', 'Step 2: find the first_name of Students table for which cell_mobile_number equals 09700166582', 'Step 3: show the rows that are in any of the results of step 1 or the results of step 2']", "feedback": "In step 1 , Addresses' country equals Haiti , not cell mobile number . Make sure address is permanent address .", "context": "What are the first names of the students who live in Haiti permanently or have the cell phone number 09700166582? || select first_name from students where cell_mobile_number like 'Haiti' union select first_name from students where cell_mobile_number = 09700166582 || student_transcripts_tracking | students : first_name, permanent_address_id, cell_mobile_number ( \"09700166582\" ) || In step 1, Addresses' country equals Haiti, not cell mobile number. Make sure address is permanent address.", "label": "student_transcripts_tracking | select students.first_name from students join addresses on students.permanent_address_id = addresses.address_id where addresses.country = 'Haiti' union select first_name from students where cell_mobile_number = '09700166582'" }, { "prediction": "cre_Doc_Template_Mgt | select document_id, document_name, document_description from documents", "gold_parse": "SELECT document_id , document_name , document_description FROM Documents", "question": "What are the ids, names, and descriptions for all documents?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T3.Document_ID , T3.Document_Name , T1.Template_Type_Description FROM Ref_Template_Types AS T1 JOIN Templates AS T2 ON T1.Template_Type_Code = T2.Template_Type_Code JOIN Documents AS T3 ON T2.Template_ID = T3.Template_ID", "predicted_parse_explanation": "['Step 1: For each row in Templates table, find corresponding rows in Ref_Template_Types table and in Documents table', 'Step 2: find Document_ID, Document_Name, Template_Type_Description of the results of step 1']", "feedback": "I want the description of document.", "context": "What are the ids, names, and descriptions for all documents? || select documents.document_id, documents.document_name, ref_template_types.template_type_description from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code join documents on templates.template_id = documents.template_id || cre_Doc_Template_Mgt | documents : document_id, document_name, document_description || I want the description of document.", "label": "cre_Doc_Template_Mgt | select document_id, document_name, document_description from documents" }, { "prediction": "flight_2 | select flightno from flights where sourceairport = 'APG'", "gold_parse": "SELECT FlightNo FROM FLIGHTS WHERE SourceAirport = \"APG\"", "question": "Give the flight numbers of flights leaving from APG.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T2.FlightNo FROM airlines AS T1 JOIN flights AS T2 WHERE T1.Abbreviation = \"APG\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in flights table', 'Step 2: find FlightNo of the results of step 1 whose Abbreviation equals APG']", "feedback": "you should use source airport instead of abbreviation.", "context": "Give the flight numbers of flights leaving from APG. || select flights.flightno from airlines join flights where airlines.abbreviation = 'APG' || flight_2 | flights : flightno, sourceairport ( \"APG\" ) || you should use source airport instead of abbreviation.", "label": "flight_2 | select flightno from flights where sourceairport = 'APG'" }, { "prediction": "car_1 | select countries.countryid, countries.countryname from countries join car_makers on countries.countryid = car_makers.country where car_makers.maker = 'fiat' group by countries.countryid having count ( * ) > 3", "gold_parse": "SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING count(*) > 3 UNION SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WHERE T3.Model = 'fiat'", "question": "What are the ids and names of all countries that either have more than 3 car makers or produce fiats?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT CountryId , CountryName FROM countries GROUP BY CountryId HAVING Count ( * ) > \"fiat\" UNION SELECT CountryId , CountryName FROM countries GROUP BY CountryId HAVING Count ( * ) > 3", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of CountryId in countries table', 'Step 2: find CountryId, CountryName in countries table whose corresponding value in step 1 is greater than fiat', 'Step 3: find CountryId, CountryName in countries table whose corresponding value in step 1 is greater than 3', 'Step 4: show the rows that are in any of the results of step 2 or the results of step 4']", "feedback": "In step 2, confirm that maker is fiat and display result of step 2 and 3. Also Omit the phrase \"is greater than fiat\".", "context": "What are the ids and names of all countries that either have more than 3 car makers or produce fiats? || select countryid, countryname from countries group by countryid having count ( * ) > 'fiat' union select countryid, countryname from countries group by countryid having count ( * ) > 3 || car_1 | countries : countryid, countryname | car_makers : country, maker ( \"fiat\" ) || In step 2, confirm that maker is fiat and display result of step 2 and 3. Also Omit the phrase \"is greater than fiat\".", "label": "car_1 | select countries.countryid, countries.countryname from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) > 3 union select countries.countryid, countries.countryname from countries join car_makers on countries.countryid = car_makers.country join model_list on car_makers.id = model_list.maker where model_list.model = 'fiat'" }, { "prediction": "employee_hire_evaluation | select * from hiring", "gold_parse": "SELECT * FROM hiring", "question": "What is all the information about hiring?", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT * FROM employee", "predicted_parse_explanation": "['find the rows of employee table']", "feedback": "Need to take hiring table in place of employee table .", "context": "What is all the information about hiring? || select * from employee || employee_hire_evaluation | hiring : || Need to take hiring table in place of employee table.", "label": "employee_hire_evaluation | select * from hiring" }, { "prediction": "cre_Doc_Template_Mgt | select document_id from paragraphs group by document_id having count ( * ) >= 2", "gold_parse": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", "question": "What are the ids of documents that have 2 or more paragraphs?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T1.Document_ID FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.Document_ID = T2.Document_ID GROUP BY T2.Document_ID HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: For each row in Documents table, find the corresponding rows in Paragraphs table', \"Step 2: find the number of rows of each value of Paragraphs's Document_ID in the results of step 1\", \"Step 3: find Documents's Document_ID in the results of step 1 whose corresponding value in step 2 is greater than or equals 2\"]", "feedback": "Note that there should not be any repetition in output.", "context": "What are the ids of documents that have 2 or more paragraphs? || select documents.document_id from documents join paragraphs on documents.document_id = paragraphs.document_id group by paragraphs.document_id having count ( * ) > = 2 || cre_Doc_Template_Mgt | paragraphs : document_id || Note that there should not be any repetition in output.", "label": "cre_Doc_Template_Mgt | select document_id from paragraphs group by document_id having count ( * ) >= 2" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"", "question": "Which airlines have a flight with destination airport AHD?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines WHERE Abbreviation = \"AHD\"", "predicted_parse_explanation": "['find the Airline of airlines table for which Abbreviation equals AHD']", "feedback": "Swap abbreviation with flights's destination airport .", "context": "Which airlines have a flight with destination airport AHD? || select airline from airlines where abbreviation = 'AHD' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"AHD\" ) || Swap abbreviation with flights's destination airport.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.destairport = 'AHD'" }, { "prediction": "world_1 | select count ( distinct governmentform ) from country where continent = 'Africa'", "gold_parse": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"", "question": "How many type of governments are in Africa?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM country WHERE Continent = \"Africa\"", "predicted_parse_explanation": "['find the number of rows in country table whose Continent equals Africa']", "feedback": "You need to search for distinct government forms.", "context": "How many type of governments are in Africa? || select count ( * ) from country where continent = 'Africa' || world_1 | country : governmentform, continent ( \"Africa\" ) || You need to search for distinct government forms.", "label": "world_1 | select count ( distinct governmentform ) from country where continent = 'Africa'" }, { "prediction": "network_1 | select highschooler.name from highschooler join likes on highschooler.id = likes.student_id group by likes.student_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "question": "Give the name of the student with the most likes.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.name FROM Highschooler AS T1 JOIN Friend AS T2 ON T1.ID = T2.student_id GROUP BY T2.student_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Highschooler table, find the corresponding rows in Friend table', 'Step 2: find the number of rows of each value of student_id in the results of step 1', 'Step 3: find name of step 1 results with largest value in the results of step 2']", "feedback": "Exchange friend table with likes table in step 1.", "context": "Give the name of the student with the most likes. || select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id order by count ( * ) desc limit 1 || network_1 | highschooler : name, id | likes : student_id || Exchange friend table with likes table in step 1.", "label": "network_1 | select highschooler.name from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select country.region from country join countrylanguage on country.countrycode = countrylanguage.countrycode where countrylanguage.language = 'Dutch' or countrylanguage.language = 'english'", "gold_parse": "SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" OR T2.Language = \"Dutch\"", "question": "Which regions speak Dutch or English?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE Continent = \"English\" OR LocalName = \"Dutch\"", "predicted_parse_explanation": "['find Continent of country table whose Continent equals English or LocalName equals Dutch']", "feedback": "Replace first continent with region , Second continent and local name both with language .", "context": "Which regions speak Dutch or English? || select continent from country where continent = 'English' or localname = 'Dutch' || world_1 | country : region, countrycode | countrylanguage : countrycode, language ( \"english\" ) || Replace first continent with region, Second continent and local name both with language.", "label": "world_1 | select distinct country.region from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' or countrylanguage.language = 'Dutch'" }, { "prediction": "tvshow | select title from cartoon where directed_by = 'Ben Jones' or directed_by = 'Brandon Vietti'", "gold_parse": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\"", "question": "What are the titles of all cartoons directed by Ben Jones or Brandon Vietti?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Title FROM Cartoon WHERE Written_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\"", "predicted_parse_explanation": "['find Title of Cartoon table whose Written_by equals Ben Jones or Directed_by equals Brandon Vietti']", "feedback": "You have to use right parameter which is directed by and not the written by.", "context": "What are the titles of all cartoons directed by Ben Jones or Brandon Vietti? || select title from cartoon where written_by = 'Ben Jones' or directed_by = 'Brandon Vietti' || tvshow | cartoon : title, directed_by ( \"Brandon Vietti\" ) || You have to use right parameter which is directed by and not the written by.", "label": "tvshow | select title from cartoon where directed_by = 'Ben Jones' or directed_by = 'Brandon Vietti'" }, { "prediction": "student_transcripts_tracking | select semester_id from student_enrolment where degree_program_id = 'Master' intersect select semester_id from student_enrolment where degree_program_id = 'Bachelor'", "gold_parse": "SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'", "question": "What is the id of the semester that had both Masters and Bachelors students enrolled?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T2.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id WHERE T1.semester_name = \"Master\" INTERSECT SELECT T2.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id WHERE T1.semester_name = \"Bachelor\"", "predicted_parse_explanation": "['Step 1: For each row in Semesters table, find the corresponding rows in Student_Enrolment table', \"Step 2: find Student_Enrolment's semester_id of the results of step 1 whose semester_name equals Master\", \"Step 3: find Student_Enrolment's semester_id of the results of step 1 whose semester_name equals Bachelor\", 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "In step 1 Replace semesters with degree programs , In step 2 and step 3 replace semester name with degree summary name .", "context": "What is the id of the semester that had both Masters and Bachelors students enrolled? || select student_enrolment.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id where semesters.semester_name = 'Master' intersect select student_enrolment.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id where semesters.semester_name = 'Bachelor' || student_transcripts_tracking | student_enrolment : semester_id, degree_program_id ( \"Bachelor\" ) || In step 1 Replace semesters with degree programs, In step 2 and step 3 replace semester name with degree summary name.", "label": "student_transcripts_tracking | select distinct student_enrolment.semester_id from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id where degree_summary_name = 'Master' intersect select distinct student_enrolment.semester_id from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id where degree_summary_name = 'Bachelor'" }, { "prediction": "world_1 | select count ( distinct country.continent ) from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Chinese'", "gold_parse": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", "question": "What is the number of distinct continents where Chinese is spoken?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Region ) FROM country WHERE Continent = \"Chinese\"", "predicted_parse_explanation": "['find the number of different Region in country table whose Continent equals Chinese']", "feedback": "Exchange region with continent and continent with language , Verify it is spoken in country .", "context": "What is the number of distinct continents where Chinese is spoken? || select count ( distinct region ) from country where continent = 'Chinese' || world_1 | country : continent, code | countrylanguage : countrycode, language ( \"Chinese\" ) || Exchange region with continent and continent with language, Verify it is spoken in country.", "label": "world_1 | select count ( distinct continent ) from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Chinese'" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from documents", "gold_parse": "SELECT count(*) FROM Documents", "question": "Count the number of documents.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "Change reference template types table with documents table .", "context": "Count the number of documents. || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | documents : || Change reference template types table with documents table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from documents" }, { "prediction": "student_transcripts_tracking | select semester_name from semesters where semester_id not in ( select semester_id from student_enrolment )", "gold_parse": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", "question": "Which semesters do not have any student enrolled? List the semester name.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T1.semester_id FROM Semesters AS T1 WHERE T1.semester_id NOT IN ( SELECT T2.semester_id FROM Student_Enrolment AS T2 )", "predicted_parse_explanation": "['Step 1: find the semester_id of Student_Enrolment table', \"Step 2: find the Semesters's semester_id of Semesters table whose Semesters's semester_id not one of the results of step 1\"]", "feedback": "You need to search for the name of semester from semester table whose id of semester is not available in student enrolment table.", "context": "Which semesters do not have any student enrolled? List the semester name. || select semesters.semester_id from semesters where semesters.semester_id not in ( select student_enrolment.semester_id from student_enrolment ) || student_transcripts_tracking | semesters : semester_name, semester_id | student_enrolment : semester_id || You need to search for the name of semester from semester table whose id of semester is not available in student enrolment table.", "label": "student_transcripts_tracking | select semester_name from semesters where semester_id not in ( select semester_id from student_enrolment )" }, { "prediction": "flight_2 | select airports.city from airports join flights on airports.airportcode = flights.sourceairport group by airports.city order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "question": "Which city has most number of arriving flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT City FROM airports GROUP BY City ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of City in airports table', 'Step 2: find City of airports table with largest value in the results of step 1']", "feedback": "In step 1 Change \"City in airports table\" with city of destination airport in flights table\".", "context": "Which city has most number of arriving flights? || select city from airports group by city order by count ( * ) desc limit 1 || flight_2 | airports : city, airportcode | flights : sourceairport || In step 1 Change \"City in airports table\" with city of destination airport in flights table\".", "label": "flight_2 | select airports.city from airports join flights on airports.airportcode = flights.destairport group by airports.city order by count ( * ) desc limit 1" }, { "prediction": "dog_kennels | select owners.owner_id, owners.first_name, owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id group by owners.owner_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "question": "Return the owner id, first name and last name of the owner who has the most dogs.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT owner_id , first_name , last_name FROM Owners GROUP BY owner_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of owner_id in Owners table', 'Step 2: find owner_id, first_name, last_name of Owners table with largest value in the results of step 1']", "feedback": "In step 1 Use dogs table instead of owners table .", "context": "Return the owner id, first name and last name of the owner who has the most dogs. || select owner_id, first_name, last_name from owners group by owner_id order by count ( * ) desc limit 1 || dog_kennels | owners : owner_id, first_name, last_name | dogs : owner_id || In step 1 Use dogs table instead of owners table.", "label": "dog_kennels | select dogs.owner_id, owners.first_name, owners.last_name from dogs join owners on dogs.owner_id = owners.owner_id group by dogs.owner_id order by count ( * ) desc limit 1" }, { "prediction": "student_transcripts_tracking | select transcript_date, other_details from transcripts", "gold_parse": "SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1", "question": "What is the earliest date of a transcript release, and what details can you tell me?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT transcript_date , other_details FROM Transcripts", "predicted_parse_explanation": "['find the transcript_date, other_details of Transcripts table']", "feedback": "Find transcript id ahead of transcript date , other details , and ensure to find for smallest value of transcript date", "context": "What is the earliest date of a transcript release, and what details can you tell me? || select transcript_date, other_details from transcripts || student_transcripts_tracking | transcripts : transcript_date, other_details || Find transcript id ahead of transcript date, other details, and ensure to find for smallest value of transcript date", "label": "student_transcripts_tracking | select transcript_date, other_details from transcripts order by transcript_date asc limit 1" }, { "prediction": "wta_1 | select players.first_name, sum ( rankings.ranking_points ) from players join rankings on players.player_id = rankings.player_id", "gold_parse": "SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "question": "What are the first names of all players, and their total ranking points?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T2.ranking FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in rankings table', 'Step 2: find first_name, ranking of the results of step 1']", "feedback": "Switch ranking to total ranking points.", "context": "What are the first names of all players, and their total ranking points? || select players.first_name, rankings.ranking from players join rankings on players.player_id = rankings.player_id || wta_1 | players : first_name, player_id | rankings : ranking_points, player_id || Switch ranking to total ranking points.", "label": "wta_1 | select sum ( ranking_points ), players.first_name from players join rankings on players.player_id = rankings.player_id group by players.first_name" }, { "prediction": "battle_death | select death.injured, death.caused_by_ship_id from ship join death on ship.id = death.caused_by_ship_id where ship.tonnage = 't'", "gold_parse": "SELECT T1.killed , T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id WHERE T2.tonnage = 't'", "question": "What are the death and injury situations caused by the ship with tonnage 't'?", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT T2.note , T2.killed FROM ship AS T1 JOIN death AS T2 ON T1.id = T2.caused_by_ship_id WHERE T1.tonnage = \"t\"", "predicted_parse_explanation": "['Step 1: For each row in ship table, find the corresponding rows in death table', 'Step 2: find note, killed of the results of step 1 whose tonnage equals t']", "feedback": "No need to find note , find injured in place of that .", "context": "What are the death and injury situations caused by the ship with tonnage 't'? || select death.note, death.killed from ship join death on ship.id = death.caused_by_ship_id where ship.tonnage = 't' || battle_death | death : injured, caused_by_ship_id | ship : id, tonnage ( \"t\" ) || No need to find note, find injured in place of that.", "label": "battle_death | select death.killed, death.injured from death join ship on death.caused_by_ship_id = ship.id where ship.tonnage = 't'" }, { "prediction": "dog_kennels | select count ( professional_id ) from treatments union select dog_id from treatments", "gold_parse": "SELECT count(DISTINCT professional_id) FROM Treatments", "question": "Find the number of professionals who have ever treated dogs.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Dogs WHERE weight = 7.57", "predicted_parse_explanation": "['find the number of rows in Dogs table whose weight equals 7.57']", "feedback": "Find the number of rows in treatments table .", "context": "Find the number of professionals who have ever treated dogs. || select count ( * ) from dogs where weight = 7.57 || dog_kennels | treatments : professional_id, dog_id || Find the number of rows in treatments table.", "label": "dog_kennels | select count ( distinct professional_id ) from treatments" }, { "prediction": "wta_1 | select count ( * ), hand from players group by hand", "gold_parse": "SELECT count(*) , hand FROM players GROUP BY hand", "question": "How many players are there for each hand type?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , T1.hand FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T2.loser_id", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find each value of loser_id in the results of step 1 along with the number of the corresponding rows to each value']", "feedback": "You need to use hand in lieu of loser Id.", "context": "How many players are there for each hand type? || select count ( * ), players.hand from players join matches on players.player_id = matches.loser_id group by matches.loser_id || wta_1 | players : hand || You need to use hand in lieu of loser Id.", "label": "wta_1 | select count ( * ), hand from players group by hand" }, { "prediction": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.headofstate = 'Beatrix'", "gold_parse": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\" AND T2.IsOfficial = \"T\"", "question": "What is the official language spoken in the country whose head of state is Beatrix?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Code2 FROM country WHERE Continent = \"Beatrix\"", "predicted_parse_explanation": "['find the Code2 of country table for which Continent equals Beatrix']", "feedback": "you should use language , countrylanguage,country's head of state and make sure is official is t.", "context": "What is the official language spoken in the country whose head of state is Beatrix? || select code2 from country where continent = 'Beatrix' || world_1 | countrylanguage : language, countrycode | country : code, headofstate ( \"Beatrix\" ) || you should use language, countrylanguage,country's head of state and make sure is official is t.", "label": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.headofstate = 'Beatrix' and countrylanguage.isofficial = 'T'" }, { "prediction": "tvshow | select title from cartoon where directed_by = 'Ben Jones'", "gold_parse": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\"", "question": "List all cartoon directed by \"Ben Jones\".", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Title FROM Cartoon WHERE Written_by = \"Ben Jones\" AND Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['find Title of Cartoon table whose Written_by equals Ben Jones and Directed_by equals Ben Jones']", "feedback": "You should delete \"written by equals Ben Jones and \".", "context": "List all cartoon directed by \"Ben Jones\". || select title from cartoon where written_by = 'Ben Jones' and directed_by = 'Ben Jones' || tvshow | cartoon : title, directed_by ( \"Ben Jones\" ) || You should delete \"written by equals Ben Jones and \".", "label": "tvshow | select title from cartoon where directed_by = 'Ben Jones'" }, { "prediction": "voter_1 | select area_code_state.area_code from area_code_state join votes on area_code_state.area_code = votes.area_code group by votes.area_code order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code ORDER BY count(*) DESC LIMIT 1", "question": "What is the area code in which the most voters voted?", "db_id": "voter_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "AREA_CODE_STATE", "CONTESTANTS", "VOTES" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "area_code", "state", "contestant_number", "contestant_name", "vote_id", "phone_number", "state", "contestant_number", "created" ] }, "db_foreign_keys": { "column_id": [ 8, 7 ], "other_column_id": [ 3, 2 ] }, "predicted_parse_with_values": "SELECT area_code FROM AREA_CODE_STATE GROUP BY state ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of state in AREA_CODE_STATE table', 'Step 2: find area_code of AREA_CODE_STATE table with largest value in the results of step 1']", "feedback": "In step 1, I want the area code mentioned in votes table.", "context": "What is the area code in which the most voters voted? || select area_code from area_code_state group by state order by count ( * ) desc limit 1 || voter_1 | area_code_state : area_code | votes : area_code || In step 1, I want the area code mentioned in votes table.", "label": "voter_1 | select area_code_state.area_code from area_code_state join votes on area_code_state.state = votes.state group by area_code_state.area_code order by count ( * ) desc limit 1" }, { "prediction": "student_transcripts_tracking | select course_description from courses where course_id = ( select course_id from courses where course_name ='math' )", "gold_parse": "SELECT course_description FROM Courses WHERE course_name = 'math'", "question": "How is the math course described?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Courses WHERE course_name = \"math\"", "predicted_parse_explanation": "['find the number of rows in Courses table whose course_name equals math']", "feedback": "You need to search for explanation of course whose name of course should be math.", "context": "How is the math course described? || select count ( * ) from courses where course_name ='math' || student_transcripts_tracking | courses : course_description, course_id, course_name ( \"math\" ) || You need to search for explanation of course whose name of course should be math.", "label": "student_transcripts_tracking | select course_description from courses where course_name ='math'" }, { "prediction": "flight_2 | select airportname from airports except select airports.airportname from airports join flights on airports.airportcode = flights.sourceairport or flights.destairport", "gold_parse": "SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)", "question": "Find the name of airports which do not have any flight in and out.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT AirportName FROM airports EXCEPT SELECT AirportName FROM airports", "predicted_parse_explanation": "['Step 1: find the AirportName of airports table', 'Step 2: find the AirportName of airports table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "In step 2 Ensure to find for whose corresponding airport code belongs in either source airport or destination airport .", "context": "Find the name of airports which do not have any flight in and out. || select airportname from airports except select airportname from airports || flight_2 | airports : airportname, airportcode | flights : sourceairport, destairport || In step 2 Ensure to find for whose corresponding airport code belongs in either source airport or destination airport.", "label": "flight_2 | select airportname from airports where airportcode not in ( select sourceairport from flights union select destairport from flights )" }, { "prediction": "dog_kennels | select distinct breed_code, size_code from dogs", "gold_parse": "SELECT DISTINCT breed_code , size_code FROM dogs", "question": "Find the distinct breed type and size type combinations for dogs.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT DISTINCT T1.breed_name , T3.treatment_type_code FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id", "predicted_parse_explanation": "['Step 1: For each row in Dogs table, find corresponding rows in Breeds table and in Treatments table', 'Step 2: find without repetition breed_name, treatment_type_code of the results of step 1']", "feedback": "Only size code should be used in step 2.", "context": "Find the distinct breed type and size type combinations for dogs. || select distinct breeds.breed_name, treatments.treatment_type_code from breeds join dogs on breeds.breed_code = dogs.breed_code join treatments on dogs.dog_id = treatments.dog_id || dog_kennels | dogs : breed_code, size_code || Only size code should be used in step 2.", "label": "dog_kennels | select distinct breed_code, size_code from dogs" }, { "prediction": "dog_kennels | select professionals.first_name, professionals.last_name from professionals join treatments on professionals.professional_id = treatments.professional_id where treatments.cost_of_treatment < ( select avg ( cost_of_treatment ) from treatments )", "gold_parse": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )", "question": "Which professionals have operated a treatment that costs less than the average? Give me theor first names and last names.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.first_name , T2.last_name FROM Charges AS T1 JOIN Professionals AS T2 WHERE T1.charge_amount < ( SELECT Avg ( T1.charge_amount ) FROM Charges AS T1 )", "predicted_parse_explanation": "['Step 1: find the average charge_amount in Charges table', 'Step 2: For each row in Charges table, find the corresponding rows in Professionals table', 'Step 3: find first_name, last_name in the results of step 2 whose charge_amount less than the results of step 1']", "feedback": "Change charge amount , charges table with cost of treatment , treatments table in all step , Exchange charges table with treatments table instep 2.", "context": "Which professionals have operated a treatment that costs less than the average? Give me theor first names and last names. || select professionals.first_name, professionals.last_name from charges join professionals where charges.charge_amount < ( select avg ( charges.charge_amount ) from charges ) || dog_kennels | professionals : first_name, last_name, professional_id | treatments : professional_id, cost_of_treatment || Change charge amount, charges table with cost of treatment, treatments table in all step, Exchange charges table with treatments table instep 2.", "label": "dog_kennels | select distinct professionals.first_name, professionals.last_name from professionals join treatments where cost_of_treatment < ( select avg ( cost_of_treatment ) from treatments )" }, { "prediction": "flight_2 | select city, country from airports where city = 'Alton'", "gold_parse": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"", "question": "Give the city and country for the Alton airport.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT City , Country FROM airports WHERE AirportName = \"Alton\" AND CountryAbbrev = \"US \"", "predicted_parse_explanation": "['find City, Country of airports table whose AirportName equals Alton and CountryAbbrev equals US ']", "feedback": "Remove \"and country abbrev equals US\".", "context": "Give the city and country for the Alton airport. || select city, country from airports where airportname = 'Alton' and countryabbrev = 'US'|| flight_2 | airports : city ( \"Alton\" ), country || Remove \"and country abbrev equals US\".", "label": "flight_2 | select city, country from airports where airportname = 'Alton'" }, { "prediction": "world_1 | select count ( * ) from country join countrylanguage on country.continent = countrylanguage.countrycode where countrylanguage.language = 'Chinese'", "gold_parse": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", "question": "How many continents speak Chinese?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM country WHERE Continent = \"Chinese\"", "predicted_parse_explanation": "['find the number of rows in country table whose Continent equals Chinese']", "feedback": "Exchange continent with countrylanguage's language .", "context": "How many continents speak Chinese? || select count ( * ) from country where continent = 'Chinese' || world_1 | country : continent, code | countrylanguage : countrycode, language ( \"Chinese\" ) || Exchange continent with countrylanguage's language.", "label": "world_1 | select count ( distinct continent ) from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Chinese'" }, { "prediction": "museum_visit | select name from museum where num_of_staff > ( select min ( num_of_staff ) from museum where open_year > 2010 )", "gold_parse": "SELECT name FROM museum WHERE num_of_staff > (SELECT min(num_of_staff) FROM museum WHERE open_year > 2010)", "question": "find the names of museums which have more staff than the minimum staff number of all museums opened after 2010.", "db_id": "museum_visit", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "museum", "visitor", "visit" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "Museum_ID", "Name", "Num_of_Staff", "Open_Year", "ID", "Name", "Level_of_membership", "Age", "Museum_ID", "visitor_ID", "Num_of_Ticket", "Total_spent" ] }, "db_foreign_keys": { "column_id": [ 10, 9 ], "other_column_id": [ 5, 1 ] }, "predicted_parse_with_values": "SELECT Name FROM museum WHERE Num_of_Staff > ( SELECT Min ( Num_of_Staff ) FROM museum WHERE Open_Year < 2010 )", "predicted_parse_explanation": "['Step 1: find the minimum Num_of_Staff in museum table whose Open_Year less than 2010', 'Step 2: find the Name of museum table whose Num_of_Staff greater than the results of step 1']", "feedback": "open year in step one should be greater than 2010", "context": "find the names of museums which have more staff than the minimum staff number of all museums opened after 2010. || select name from museum where num_of_staff > ( select min ( num_of_staff ) from museum where open_year < 2010 ) || museum_visit | museum : name, num_of_staff, open_year ( 2010 ) || open year in step one should be greater than 2010", "label": "museum_visit | select name from museum where num_of_staff > ( select min ( num_of_staff ) from museum where open_year > 2010 )" }, { "prediction": "flight_2 | select flights.flightno from airlines join flights on airlines.uid = flights.airline where airlines.airline = 'United Airlines'", "gold_parse": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"", "question": "What are flight numbers of Airline \"United Airlines\"?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T2.FlightNo FROM airlines AS T1 JOIN flights AS T2 WHERE T1.Airline = \"United Airlines\" AND T1.Country = \"USA\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in flights table', \"Step 2: find FlightNo of the results of step 1 whose airlines's Airline equals United Airlines and Country equals USA\"]", "feedback": "you should delete the phrase \"and country equals usa\".", "context": "What are flight numbers of Airline \"United Airlines\"? || select flights.flightno from airlines join flights where airlines.airline = 'United Airlines' and airlines.country = 'USA' || flight_2 | flights : flightno, airline | airlines : uid, airline ( \"United Airlines\" ) || you should delete the phrase \"and country equals usa\".", "label": "flight_2 | select flights.flightno from flights join airlines on airlines.uid = flights.airline where airlines.airline = 'United Airlines'" }, { "prediction": "network_1 | select highschooler.name from highschooler join likes on highschooler.id = likes.student_id group by likes.student_id having count ( * ) >= 2", "gold_parse": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2", "question": "Show the names of students who have at least 2 likes.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.name FROM Highschooler AS T1 JOIN Friend AS T2 ON T1.ID = T2.student_id GROUP BY T2.student_id HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: For each row in Highschooler table, find the corresponding rows in Friend table', 'Step 2: find the number of rows of each value of student_id in the results of step 1', 'Step 3: find name in the results of step 1 whose corresponding value in step 2 is greater than or equals 2']", "feedback": "Substitute friend table with likes table in step 1.", "context": "Show the names of students who have at least 2 likes. || select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id having count ( * ) > = 2 || network_1 | highschooler : name, id | likes : student_id || Substitute friend table with likes table in step 1.", "label": "network_1 | select highschooler.name from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id having count ( * ) >= 2" }, { "prediction": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join country on country.code = country.countrycode where countrylanguage.language = 'French' and countrylanguage.isofficial = ( select official from country where language = 'English' )", "gold_parse": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\" AND T2.IsOfficial = \"T\"", "question": "Give the names of countries with English and French as official languages.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE Code2 = \"T\" INTERSECT SELECT Continent FROM country WHERE Code2 = \"French\"", "predicted_parse_explanation": "['Step 1: find the Continent of country table for which Code2 equals T', 'Step 2: find the Continent of country table for which Code2 equals French', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Find name name of country table which language equals English and French and is official equals T .", "context": "Give the names of countries with English and French as official languages. || select continent from country where code2 = 'T' intersect select continent from country where code2 = 'French' || world_1 | country : name, code | countrylanguage : countrycode, language ( \"French\" ), isofficial || Find name name of country table which language equals English and French and is official equals T.", "label": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' and countrylanguage.isofficial = 'T'" }, { "prediction": "cre_Doc_Template_Mgt | select template_type_code, count ( * ) from templates group by template_type_code", "gold_parse": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code", "question": "What are the different template type codes, and how many documents use each type?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_Type_Code , Count ( * ) FROM Templates GROUP BY Template_Type_Code", "predicted_parse_explanation": "['find each value of Template_Type_Code in Templates table along with the number of the corresponding rows to each value']", "feedback": "In document table you should have number of each template type code.", "context": "What are the different template type codes, and how many documents use each type? || select template_type_code, count ( * ) from templates group by template_type_code || cre_Doc_Template_Mgt | templates : template_type_code || In document table you should have number of each template type code.", "label": "cre_Doc_Template_Mgt | select templates.template_type_code, count ( * ) from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from templates where template_type_code = 'CV'", "gold_parse": "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"", "question": "Count the number of templates of the type CV.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "CV should be the template type code.", "context": "Count the number of templates of the type CV. || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | templates : template_type_code ( \"CV\" ) || CV should be the template type code.", "label": "cre_Doc_Template_Mgt | select count ( * ) from templates where template_type_code = 'CV'" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"", "question": "Which airlines have a flight with destination airport AHD?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines WHERE Abbreviation = \"AHD\"", "predicted_parse_explanation": "['find the Airline of airlines table for which Abbreviation equals AHD']", "feedback": "exchange between destination airport and destination airport of flight table.", "context": "Which airlines have a flight with destination airport AHD? || select airline from airlines where abbreviation = 'AHD' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"AHD\" ) || exchange between destination airport and destination airport of flight table.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.destairport = 'AHD'" }, { "prediction": "car_1 | select count ( * ), accelerate from cars_data where horsepower > ( select max ( horsepower ) from cars_data )", "gold_parse": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 )", "question": "What is the number of cars with a greater accelerate than the one with the most horsepower?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM cars_data WHERE Accelerate > 1", "predicted_parse_explanation": "['find the number of rows in cars_data table whose Accelerate greater than 1']", "feedback": "along with that, i also want the highest value in horsepower.", "context": "What is the number of cars with a greater accelerate than the one with the most horsepower? || select count ( * ) from cars_data where accelerate > 1 || car_1 | cars_data : accelerate, horsepower || along with that, i also want the highest value in horsepower.", "label": "car_1 | select count ( * ) from cars_data where accelerate > ( select accelerate from cars_data order by horsepower desc limit 1 )" }, { "prediction": "employee_hire_evaluation | select manager_name, district from shop order by number_products desc limit 1", "gold_parse": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1", "question": "What are the manager name and district of the shop that sells the largest number of products?", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT Manager_name , District FROM shop GROUP BY Shop_ID ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Shop_ID in shop table', 'Step 2: find Manager_name, District of shop table with largest value in the results of step 1']", "feedback": "In step 1 , Ensure to search the product number for all shop.", "context": "What are the manager name and district of the shop that sells the largest number of products? || select manager_name, district from shop group by shop_id order by count ( * ) desc limit 1 || employee_hire_evaluation | shop : manager_name, district, number_products || In step 1, Ensure to search the product number for all shop.", "label": "employee_hire_evaluation | select manager_name, district from shop order by number_products desc limit 1" }, { "prediction": "student_transcripts_tracking | select students.first_name from addresses join students on addresses.address_id = students.permanent_address_id", "gold_parse": "SELECT first_name FROM Students WHERE current_address_id != permanent_address_id", "question": "Whose permanent address is different from his or her current address? List his or her first name.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT first_name FROM Students UNION SELECT first_name FROM Students", "predicted_parse_explanation": "['Step 1: find the first_name of Students table', 'Step 2: find the first_name of Students table', 'Step 3: show the rows that are in any of the results of step 1 or the results of step 2']", "feedback": "I want student's name for which id of permanent address should not be same as id of current address.", "context": "Whose permanent address is different from his or her current address? List his or her first name. || select first_name from students union select first_name from students || student_transcripts_tracking | students : first_name, permanent_address_id | addresses : address_id || I want student's name for which id of permanent address should not be same as id of current address.", "label": "student_transcripts_tracking | select first_name from students where current_address_id!= permanent_address_id" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from templates", "gold_parse": "SELECT count(*) FROM Templates", "question": "Count the number of templates.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "templates table should be use in place of reference template types table .", "context": "Count the number of templates. || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | templates : || templates table should be use in place of reference template types table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from templates" }, { "prediction": "flight_2 | select count ( * ) from flights", "gold_parse": "SELECT count(*) FROM FLIGHTS", "question": "Return the number of flights.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines", "predicted_parse_explanation": "['find the number of rows in airlines table']", "feedback": "Replace airlines with flights .", "context": "Return the number of flights. || select count ( * ) from airlines || flight_2 | flights : || Replace airlines with flights.", "label": "flight_2 | select count ( * ) from flights" }, { "prediction": "world_1 | select name from country order by population desc limit 3", "gold_parse": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3", "question": "Return the names of the 3 most populated countries.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM city ORDER BY Population Desc LIMIT 3", "predicted_parse_explanation": "['Step 1: find the Name of city table ordered descending by Population', 'Step 2: only show the first 3 rows of the results']", "feedback": "In step 1, use country instead of city.", "context": "Return the names of the 3 most populated countries. || select name from city order by population desc limit 3 || world_1 | country : name, population || In step 1, use country instead of city.", "label": "world_1 | select name from country order by population desc limit 3" }, { "prediction": "pets_1 | select pettype, weight from pets order by pet_age asc limit 1", "gold_parse": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1", "question": "What type of pet is the youngest animal, and how much does it weigh?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT PetType , pet_age FROM Pets ORDER BY pet_age Asc LIMIT 1", "predicted_parse_explanation": "['find the PetType, pet_age of Pets table with smallest value of pet_age']", "feedback": "use weight in place of pet age.", "context": "What type of pet is the youngest animal, and how much does it weigh? || select pettype, pet_age from pets order by pet_age asc limit 1 || pets_1 | pets : pettype, weight, pet_age || use weight in place of pet age.", "label": "pets_1 | select pettype, weight from pets order by pet_age asc limit 1" }, { "prediction": "wta_1 | select first_name, last_name from players where hand = 'left' order by birth_date asc", "gold_parse": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date", "question": "What are the full names of all left handed players, in order of birth date?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT first_name , last_name FROM players ORDER BY birth_date Asc", "predicted_parse_explanation": "['find the first_name, last_name of players table ordered ascending by birth_date']", "feedback": "Make sure that player are left handed.", "context": "What are the full names of all left handed players, in order of birth date? || select first_name, last_name from players order by birth_date asc || wta_1 | players : first_name, last_name, hand ( \"left\" ), birth_date || Make sure that player are left handed.", "label": "wta_1 | select first_name, last_name from players where hand = 'L' order by birth_date asc" }, { "prediction": "car_1 | select countries.countryname from countries join car_makers on countries.countryid = car_makers.country join continents on car_makers.id = continents.contid where continents.continent = 'Europe' group by countries.countryname having count ( * ) >= 3", "gold_parse": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3", "question": "Which countries in europe have at least 3 car manufacturers?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T1.CountryName FROM countries AS T1 JOIN car_makers AS T2 ON T1.CountryId = T2.Country GROUP BY T2.Country HAVING Count ( * ) > = 3", "predicted_parse_explanation": "['Step 1: For each row in countries table, find the corresponding rows in car_makers table', 'Step 2: find the number of rows of each value of Country in the results of step 1', 'Step 3: find CountryName in the results of step 1 whose corresponding value in step 2 is greater than or equals 3']", "feedback": "In step 1 also correspond continents table , In step 2 make sure country belongs in continent europe .", "context": "Which countries in europe have at least 3 car manufacturers? || select countries.countryname from countries join car_makers on countries.countryid = car_makers.country group by car_makers.country having count ( * ) > = 3 || car_1 | countries : countryname, countryid | car_makers : country, id | continents : contid, continent ( \"Europe\" ) || In step 1 also correspond continents table, In step 2 make sure country belongs in continent europe.", "label": "car_1 | select countries.countryname from countries join continents on countries.continent = continents.contid join car_makers on countries.countryid = car_makers.country where continents.continent = 'europe' group by countries.countryname having count ( * ) >= 3" }, { "prediction": "car_1 | select avg ( mpg ) from cars_data where cylinders = 4", "gold_parse": "SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4", "question": "What is the average miles per gallon(mpg) of the cars with 4 cylinders?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Avg ( Accelerate ) FROM cars_data WHERE Cylinders = 4", "predicted_parse_explanation": "['find the average Accelerate in cars_data table whose Cylinders equals 4']", "feedback": "There should be mpg instead of accelerate .", "context": "What is the average miles per gallon(mpg) of the cars with 4 cylinders? || select avg ( accelerate ) from cars_data where cylinders = 4 || car_1 | cars_data : mpg, cylinders ( 4 ) || There should be mpg instead of accelerate.", "label": "car_1 | select avg ( mpg ) from cars_data where cylinders = 4" }, { "prediction": "car_1 | select countries.countryid, countries.countryname from countries join car_makers on countries.countryid = car_makers.id join model_list on countries.countryid = model_list.modelid where car_makers.maker = 'fiat' group by countries.countryid having count ( * ) > 3", "gold_parse": "SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING count(*) > 3 UNION SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WHERE T3.Model = 'fiat'", "question": "What are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT CountryId , CountryName FROM countries GROUP BY CountryId HAVING Count ( * ) > \"fiat\" UNION SELECT CountryId , CountryName FROM countries GROUP BY CountryId HAVING Count ( * ) > 3", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of CountryId in countries table', 'Step 2: find CountryId, CountryName in countries table whose corresponding value in step 1 is greater than fiat', 'Step 3: find CountryId, CountryName in countries table whose corresponding value in step 1 is greater than 3', 'Step 4: show the rows that are in any of the results of step 2 or the results of step 4']", "feedback": "You need to find model id of fiat. Besides this in step 4, make sure to use phrase \"step 3\" in place of \"step 4\".", "context": "What are the id and names of the countries which have more than 3 car makers or produce the 'fiat' model? || select countryid, countryname from countries group by countryid having count ( * ) > 'fiat' union select countryid, countryname from countries group by countryid having count ( * ) > 3 || car_1 | countries : countryid, countryname | car_makers : id, maker ( \"fiat\" ) | model_list : modelid || You need to find model id of fiat. Besides this in step 4, make sure to use phrase \"step 3\" in place of \"step 4\".", "label": "car_1 | select countries.countryid, countries.countryname from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) > 3 union select countries.countryid, countries.countryname from countries join car_makers on countries.countryid = car_makers.country join model_list on car_makers.id = model_list.maker where model_list.model = 'fiat'" }, { "prediction": "flight_2 | select city, country from airports where city = 'Alton'", "gold_parse": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"", "question": "Which city and country is the Alton airport at?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT City , Country FROM airports WHERE AirportName = \"Alton\" AND Country = \"United States \"", "predicted_parse_explanation": "['find City, Country of airports table whose AirportName equals Alton and Country equals United States ']", "feedback": "Remove \"and country equals United States\" phrase .", "context": "Which city and country is the Alton airport at? || select city, country from airports where airportname = 'Alton' and country = 'United States'|| flight_2 | airports : city ( \"Alton\" ), country || Remove \"and country equals United States\" phrase.", "label": "flight_2 | select city, country from airports where airportname = 'Alton'" }, { "prediction": "world_1 | select name from country where indepyear > 1950", "gold_parse": "SELECT Name FROM country WHERE IndepYear > 1950", "question": "What are the names of all the countries that became independent after 1950?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE IndepYear > 1950", "predicted_parse_explanation": "['find the Continent of country table for which IndepYear greater than 1950']", "feedback": "Use name name instead of continent .", "context": "What are the names of all the countries that became independent after 1950? || select continent from country where indepyear > 1950 || world_1 | country : name, indepyear ( 1950 ) || Use name name instead of continent.", "label": "world_1 | select name from country where indepyear > 1950" }, { "prediction": "network_1 | select friend.student_id from friend join likes on friend.friend_id = likes.student_id intersect select friend.student_id from friend join likes on friend.friend_id = likes.student_id", "gold_parse": "SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes", "question": "Show the ids of high schoolers who have friends and are also liked by someone else.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.ID FROM Highschooler AS T1 INTERSECT SELECT T2.liked_id FROM Likes AS T2", "predicted_parse_explanation": "['Step 1: find the ID of Highschooler table', 'Step 2: find the liked_id of Likes table', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Ensure Highschooler's id present in friend table in step 1 , Highschooler's id present in likes table instep 2.", "context": "Show the ids of high schoolers who have friends and are also liked by someone else. || select highschooler.id from highschooler intersect select likes.liked_id from likes as likes || network_1 | friend : student_id, friend_id | likes : student_id || Ensure Highschooler's id present in friend table in step 1, Highschooler's id present in likes table instep 2.", "label": "network_1 | select student_id from friend intersect select liked_id from likes" }, { "prediction": "car_1 | select avg ( cars_data.edispl ) from cars_data join model_list on cars_data.id = model_list.modelid where model_list.model = 'volvo'", "gold_parse": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo'", "question": "What is the average edispl of the cars of model volvo?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Avg ( Horsepower ) FROM cars_data WHERE Year = \"volvo\"", "predicted_parse_explanation": "['find the average Horsepower in cars_data table whose Year equals volvo']", "feedback": "find average horsepower is wrong , find average edispl instead of that and year with car names's model .", "context": "What is the average edispl of the cars of model volvo? || select avg ( horsepower ) from cars_data where year = 'volvo' || car_1 | cars_data : edispl, id | model_list : modelid, model ( \"volvo\" ) || find average horsepower is wrong, find average edispl instead of that and year with car names's model.", "label": "car_1 | select avg ( cars_data.edispl ) from car_names join cars_data on car_names.makeid = cars_data.id where car_names.model = 'volvo'" }, { "prediction": "wta_1 | select first_name, country_code from players order by birth_date asc limit 1", "gold_parse": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1", "question": "What is the first name and country code of the oldest player?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT first_name , country_code FROM players ORDER BY birth_date Desc LIMIT 1", "predicted_parse_explanation": "['find the first_name, country_code of players table with largest value of birth_date']", "feedback": "I want smallest value of birth date.", "context": "What is the first name and country code of the oldest player? || select first_name, country_code from players order by birth_date desc limit 1 || wta_1 | players : first_name, country_code, birth_date || I want smallest value of birth date.", "label": "wta_1 | select first_name, country_code from players order by birth_date asc limit 1" }, { "prediction": "world_1 | select sum ( population ), max ( gnp ) from country where continent = 'Asia'", "gold_parse": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"", "question": "What is the total population and maximum GNP in Asia?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Sum ( Population ) , Max ( GNP ) FROM country", "predicted_parse_explanation": "['find the summation of Population and the maximum GNP in country table']", "feedback": "you need to mention that continent as asia.", "context": "What is the total population and maximum GNP in Asia? || select sum ( population ), max ( gnp ) from country || world_1 | country : population, gnp, continent ( \"Asia\" ) || you need to mention that continent as asia.", "label": "world_1 | select sum ( population ), max ( gnp ) from country where continent = 'Asia'" }, { "prediction": "flight_2 | select city, country from airports where city = 'Alton'", "gold_parse": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"", "question": "Give the city and country for the Alton airport.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT City , Country FROM airports WHERE AirportName = \"Alton\" AND CountryAbbrev = \"US \"", "predicted_parse_explanation": "['find City, Country of airports table whose AirportName equals Alton and CountryAbbrev equals US ']", "feedback": "eliminate country abbrev which is equivalent to us.", "context": "Give the city and country for the Alton airport. || select city, country from airports where airportname = 'Alton' and countryabbrev = 'US'|| flight_2 | airports : city ( \"Alton\" ), country || eliminate country abbrev which is equivalent to us.", "label": "flight_2 | select city, country from airports where airportname = 'Alton'" }, { "prediction": "orchestra | select record_company from orchestra where year_of_founded < 2003 intersect select record_company from orchestra where year_of_founded > 2003", "gold_parse": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003", "question": "Show the record companies shared by orchestras founded before 2003 and after 2003.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT * FROM orchestra WHERE Year_of_Founded > 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003", "predicted_parse_explanation": "['Step 1: find the rows of orchestra table for which Year_of_Founded greater than 2003', 'Step 2: find the Record_Company of orchestra table for which Year_of_Founded less than 2003', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "In step 1, you need to search record of a company.", "context": "Show the record companies shared by orchestras founded before 2003 and after 2003. || select * from orchestra where year_of_founded > 2003 intersect select record_company from orchestra where year_of_founded < 2003 || orchestra | orchestra : record_company, year_of_founded ( 2003 ) || In step 1, you need to search record of a company.", "label": "orchestra | select record_company from orchestra where year_of_founded < 2003 intersect select record_company from orchestra where year_of_founded > 2003" }, { "prediction": "dog_kennels | select dogs.name from owners join dogs on owners.dog_id = dogs.dog_id join treatments on owners.dog_id = treatments.dog_id where treatments.cost_of_treatment > 1000", "gold_parse": "SELECT name FROM Dogs WHERE dog_id NOT IN( SELECT dog_id FROM Treatments GROUP BY dog_id HAVING sum(cost_of_treatment) > 1000 )", "question": "What are the names of the dogs for which the owner spent more than 1000 for treatment?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT name FROM Dogs WHERE weight > 1000", "predicted_parse_explanation": "['find the name of Dogs table for which weight greater than 1000']", "feedback": "cost of treatment should not be used instead use weight.", "context": "What are the names of the dogs for which the owner spent more than 1000 for treatment? || select name from dogs where weight > 1000 || dog_kennels | dogs : name, dog_id | owners : dog_id | treatments : dog_id, cost_of_treatment ( 1000 ) || cost of treatment should not be used instead use weight.", "label": "dog_kennels | select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum ( cost_of_treatment ) > 1000 )" }, { "prediction": "world_1 | select sum ( population ), gnp from country where continent = 'Asia'", "gold_parse": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"", "question": "How many people live in Asia, and what is the largest GNP among them?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Max ( Population ) , Min ( GNP ) FROM country", "predicted_parse_explanation": "['find the maximum Population and the minimum GNP in country table']", "feedback": "you need to search for the total of population and highest gnp from county table having asia as a continent.", "context": "How many people live in Asia, and what is the largest GNP among them? || select max ( population ), min ( gnp ) from country || world_1 | country : population, gnp, continent ( \"Asia\" ) || you need to search for the total of population and highest gnp from county table having asia as a continent.", "label": "world_1 | select sum ( population ), max ( gnp ) from country where continent = 'Asia'" }, { "prediction": "world_1 | select continent from country where name = 'Anguilla'", "gold_parse": "SELECT Continent FROM country WHERE Name = \"Anguilla\"", "question": "What is the continent name which Anguilla belongs to?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country", "predicted_parse_explanation": "['find the Continent of country table']", "feedback": "Also find for region equals Anguilla along with continent .", "context": "What is the continent name which Anguilla belongs to? || select continent from country || world_1 | country : continent, name ( \"Anguilla\" ) || Also find for region equals Anguilla along with continent.", "label": "world_1 | select continent from country where name = 'Anguilla'" }, { "prediction": "cre_Doc_Template_Mgt | select template_type_code, count ( * ) from templates group by template_type_code", "gold_parse": "SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code", "question": "Show all template type codes and the number of documents using each type.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_Type_Code , Count ( * ) FROM Templates GROUP BY Template_Type_Code", "predicted_parse_explanation": "['find each value of Template_Type_Code in Templates table along with the number of the corresponding rows to each value']", "feedback": "Find the number of the corresponding rows to each value of documents table .", "context": "Show all template type codes and the number of documents using each type. || select template_type_code, count ( * ) from templates group by template_type_code || cre_Doc_Template_Mgt | templates : template_type_code || Find the number of the corresponding rows to each value of documents table.", "label": "cre_Doc_Template_Mgt | select templates.template_type_code, count ( * ) from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code" }, { "prediction": "poker_player | select people.name from people join poker_player on people.people_id = poker_player.people_id", "gold_parse": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", "question": "Return the names of all the poker players.", "db_id": "poker_player", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "poker_player", "people" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Poker_Player_ID", "People_ID", "Final_Table_Made", "Best_Finish", "Money_Rank", "Earnings", "People_ID", "Nationality", "Name", "Birth_Date", "Height" ] }, "db_foreign_keys": { "column_id": [ 2 ], "other_column_id": [ 7 ] }, "predicted_parse_with_values": "SELECT Name FROM people", "predicted_parse_explanation": "['find the Name of people table']", "feedback": "people id of people should be available in poker player table. ", "context": "Return the names of all the poker players. || select name from people || poker_player | people : name, people_id | poker_player : people_id || people id of people should be available in poker player table.", "label": "poker_player | select people.name from people join poker_player on people.people_id = poker_player.people_id" }, { "prediction": "world_1 | select count ( distinct countrylanguage.language ), country.code from country join countrylanguage on country.countrycode = countrylanguage.countrycode where country.indepyear < 1930 group by countrylanguage.language", "gold_parse": "SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = \"T\"", "question": "For the countries founded before 1930, what is the total number of distinct official languages?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Code2 , Count ( DISTINCT Code ) FROM country WHERE IndepYear < 1930 GROUP BY GovernmentForm", "predicted_parse_explanation": "['Step 1: find rows in country table whose IndepYear less than 1930', 'Step 2: find each value of GovernmentForm in the results of step 1 along with the Code of the corresponding rows to each value']", "feedback": "Find the summation of different countrylanguage's language which is official equals T in step 2.", "context": "For the countries founded before 1930, what is the total number of distinct official languages? || select code2, count ( distinct code ) from country where indepyear < 1930 group by governmentform || world_1 | countrylanguage : language, countrycode | country : code, indepyear ( 1930 ) || Find the summation of different countrylanguage's language which is official equals T in step 2.", "label": "world_1 | select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where indepyear < 1930 and countrylanguage.isofficial = 'T'" }, { "prediction": "flight_2 | select flightno from flights where sourceairport = 'APG'", "gold_parse": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"", "question": "Give the flight numbers of flights landing at APG.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T2.FlightNo FROM airlines AS T1 JOIN flights AS T2 WHERE T1.Abbreviation = \"APG\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in flights table', 'Step 2: find FlightNo of the results of step 1 whose Abbreviation equals APG']", "feedback": "Need to put destination airport in place of abbreviation in step 2.", "context": "Give the flight numbers of flights landing at APG. || select flights.flightno from airlines join flights where airlines.abbreviation = 'APG' || flight_2 | flights : flightno, sourceairport ( \"APG\" ) || Need to put destination airport in place of abbreviation in step 2.", "label": "flight_2 | select flightno from flights where destairport = 'APG'" }, { "prediction": "wta_1 | select count ( distinct winner_hand ) from matches where tourney_name = 'WTA Championships'", "gold_parse": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'", "question": "Find the number of left handed winners who participated in the WTA Championships.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM players", "predicted_parse_explanation": "['find the number of rows in players table']", "feedback": "Verify winners are left-handed and use matches table instead of players table.", "context": "Find the number of left handed winners who participated in the WTA Championships. || select count ( * ) from players || wta_1 | matches : winner_hand, tourney_name ( \"WTA Championships\" ) || Verify winners are left-handed and use matches table instead of players table.", "label": "wta_1 | select count ( distinct winner_name ) from matches where tourney_name = 'WTA Championships' and winner_hand = 'L'" }, { "prediction": "poker_player | select final_table_made, best_finish from poker_player order by final_table_made asc limit 1", "gold_parse": "SELECT Final_Table_Made , Best_Finish FROM poker_player", "question": "List the final tables made and the best finishes of poker players.", "db_id": "poker_player", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "poker_player", "people" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Poker_Player_ID", "People_ID", "Final_Table_Made", "Best_Finish", "Money_Rank", "Earnings", "People_ID", "Nationality", "Name", "Birth_Date", "Height" ] }, "db_foreign_keys": { "column_id": [ 2 ], "other_column_id": [ 7 ] }, "predicted_parse_with_values": "SELECT Final_Table_Made , Best_Finish FROM poker_player ORDER BY Best_Finish Asc LIMIT 1", "predicted_parse_explanation": "['find the Final_Table_Made, Best_Finish of poker_player table with smallest value of Best_Finish']", "feedback": "Remove \"with smallest value of Best Finish\".", "context": "List the final tables made and the best finishes of poker players. || select final_table_made, best_finish from poker_player order by best_finish asc limit 1 || poker_player | poker_player : final_table_made, best_finish || Remove \"with smallest value of Best Finish\".", "label": "poker_player | select final_table_made, best_finish from poker_player" }, { "prediction": "wta_1 | select sum ( rankings.ranking_points ), players.first_name from players join rankings on players.player_id = rankings.player_id group by players.player_id", "gold_parse": "SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "question": "Find the total ranking points for each player and their first name.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Sum ( T2.winner_rank ) , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T1.first_name", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find each value of first_name in the results of step 1 along with the summation of winner_rank of the corresponding rows to each value']", "feedback": "From 1 and 2, I want rankings and ranking points respectively.", "context": "Find the total ranking points for each player and their first name. || select sum ( matches.winner_rank ), players.first_name from players join matches on players.player_id = matches.loser_id group by players.first_name || wta_1 | rankings : ranking_points, player_id | players : first_name, player_id || From 1 and 2, I want rankings and ranking points respectively.", "label": "wta_1 | select sum ( ranking_points ), players.first_name from players join rankings on players.player_id = rankings.player_id group by players.first_name" }, { "prediction": "cre_Doc_Template_Mgt | select distinct ref_template_types.template_type_description from ref_template_types join templates on ref_template_types.template_type_code = documents.template_id", "gold_parse": "SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID", "question": "What are the distinct template type descriptions for the templates ever used by any document?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT DISTINCT Template_Type_Description FROM Ref_Template_Types", "predicted_parse_explanation": "['find without repetition the Template_Type_Description of Ref_Template_Types table']", "feedback": "You need to make sure that template should used as a document.", "context": "What are the distinct template type descriptions for the templates ever used by any document? || select distinct template_type_description from ref_template_types || cre_Doc_Template_Mgt | ref_template_types : template_type_description, template_type_code | templates : template_id | documents : template_id || You need to make sure that template should used as a document.", "label": "cre_Doc_Template_Mgt | select distinct ref_template_types.template_type_description from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code join documents on templates.template_id = documents.template_id" }, { "prediction": "car_1 | select count ( distinct model_list.model ) from car_makers join model_list on car_makers.id = model_list.maker where car_makers.maker = 'American Motor Company'", "gold_parse": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company'", "question": "What is the number of car models created by the car maker American Motor Company?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM car_makers WHERE Maker = \"American Motor Company\"", "predicted_parse_explanation": "['find the number of rows in car_makers table whose Maker equals American Motor Company']", "feedback": "Give me the total number of model list whose car maker is American Motor Company.", "context": "What is the number of car models created by the car maker American Motor Company? || select count ( * ) from car_makers where maker = 'American Motor Company' || car_1 | model_list : model, maker | car_makers : id, maker ( \"American Motor Company\" ) || Give me the total number of model list whose car maker is American Motor Company.", "label": "car_1 | select count ( * ) from car_makers join model_list on car_makers.id = model_list.maker where car_makers.fullname = 'American Motor Company'" }, { "prediction": "dog_kennels | select owners.owner_id, owners.last_name from owners join treatments on owners.owner_id = treatments.dog_id group by owners.owner_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "question": "Which owner has paid for the most treatments on his or her dogs? List the owner id and last name.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT owner_id , last_name FROM Owners GROUP BY owner_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of owner_id in Owners table', 'Step 2: find owner_id, last_name of Owners table with largest value in the results of step 1']", "feedback": "In step 1 ensure owner has spend money for the treatments for his or her dog .", "context": "Which owner has paid for the most treatments on his or her dogs? List the owner id and last name. || select owner_id, last_name from owners group by owner_id order by count ( * ) desc limit 1 || dog_kennels | owners : owner_id, last_name | treatments : dog_id || In step 1 ensure owner has spend money for the treatments for his or her dog.", "label": "dog_kennels | select owners.owner_id, owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id group by owners.owner_id order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select name from country where continent = 'Asia' order by lifeexpectancy asc limit 1", "gold_parse": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY LifeExpectancy LIMIT 1", "question": "Give the name of the country in Asia with the lowest life expectancy.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country ORDER BY LifeExpectancy Asc LIMIT 1", "predicted_parse_explanation": "['find the Name of country table with smallest value of LifeExpectancy']", "feedback": "you should check the continent is equivalent to asia.", "context": "Give the name of the country in Asia with the lowest life expectancy. || select name from country order by lifeexpectancy asc limit 1 || world_1 | country : name, continent ( \"Asia\" ), lifeexpectancy || you should check the continent is equivalent to asia.", "label": "world_1 | select name from country where continent = 'Asia' order by lifeexpectancy asc limit 1" }, { "prediction": "network_1 | select count ( distinct friend.friend_id ) from friend join highschooler on friend.student_id = highschooler.id where highschooler.name = 'Kyle'", "gold_parse": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "question": "Count the number of friends Kyle has.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Highschooler", "predicted_parse_explanation": "['find the number of rows in Highschooler table']", "feedback": "Find number of rows of student id in friend table for corresponding Highschooler's name equals Kyle .", "context": "Count the number of friends Kyle has. || select count ( * ) from highschooler || network_1 | friend : friend_id, student_id | highschooler : id, name ( \"Kyle\" ) || Find number of rows of student id in friend table for corresponding Highschooler's name equals Kyle.", "label": "network_1 | select count ( * ) from friend join highschooler on friend.student_id = highschooler.id where highschooler.name = 'Kyle'" }, { "prediction": "wta_1 | select first_name, last_name from players where hand = 'left' order by birth_date asc", "gold_parse": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date", "question": "What are the full names of all left handed players, in order of birth date?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT first_name , last_name FROM players ORDER BY birth_date Asc", "predicted_parse_explanation": "['find the first_name, last_name of players table ordered ascending by birth_date']", "feedback": "Be sure that players left handed .", "context": "What are the full names of all left handed players, in order of birth date? || select first_name, last_name from players order by birth_date asc || wta_1 | players : first_name, last_name, hand ( \"left\" ), birth_date || Be sure that players left handed.", "label": "wta_1 | select first_name, last_name from players where hand = 'L' order by birth_date asc" }, { "prediction": "dog_kennels | select cost_of_treatment, date_of_treatment from treatments order by date_of_treatment desc limit 1", "gold_parse": "SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1", "question": "How much does the most recent treatment cost?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT * FROM Treatments ORDER BY date_of_treatment Asc LIMIT 1", "predicted_parse_explanation": "['find the rows of Treatments table with smallest value of date_of_treatment']", "feedback": "Replace smallest value with largest value of date.", "context": "How much does the most recent treatment cost? || select * from treatments order by date_of_treatment asc limit 1 || dog_kennels | treatments : cost_of_treatment, date_of_treatment || Replace smallest value with largest value of date.", "label": "dog_kennels | select cost_of_treatment from treatments order by date_of_treatment desc limit 1" }, { "prediction": "tvshow | select production_code, channel from cartoon order by original_air_date asc limit 1", "gold_parse": "SELECT production_code , channel FROM cartoon ORDER BY original_air_date LIMIT 1", "question": "Find the production code and channel of the most recently aired cartoon.", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Production_code , Channel FROM Cartoon GROUP BY Channel ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Channel in Cartoon table', 'Step 2: find Production_code, Channel of Cartoon table with largest value in the results of step 1']", "feedback": "Display production code , channel of cartoon table for which original air date is lowest .", "context": "Find the production code and channel of the most recently aired cartoon. || select production_code, channel from cartoon group by channel order by count ( * ) desc limit 1 || tvshow | cartoon : production_code, channel, original_air_date || Display production code, channel of cartoon table for which original air date is lowest.", "label": "tvshow | select production_code, channel from cartoon order by original_air_date asc limit 1" }, { "prediction": "dog_kennels | select dogs.name from owners join dogs on owners.dog_id = dogs.dog_id join treatments on owners.dog_id = treatments.dog_id where treatments.cost_of_treatment > 1000", "gold_parse": "SELECT name FROM Dogs WHERE dog_id NOT IN( SELECT dog_id FROM Treatments GROUP BY dog_id HAVING sum(cost_of_treatment) > 1000 )", "question": "What are the names of the dogs for which the owner spent more than 1000 for treatment?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT name FROM Dogs WHERE weight > 1000", "predicted_parse_explanation": "['find the name of Dogs table for which weight greater than 1000']", "feedback": "Exchange weight with cost of treatment .", "context": "What are the names of the dogs for which the owner spent more than 1000 for treatment? || select name from dogs where weight > 1000 || dog_kennels | dogs : name, dog_id | owners : dog_id | treatments : dog_id, cost_of_treatment ( 1000 ) || Exchange weight with cost of treatment.", "label": "dog_kennels | select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum ( cost_of_treatment ) > 1000 )" }, { "prediction": "world_1 | select avg ( country.lifeexpectancy ) from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language!= 'english'", "gold_parse": "SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\")", "question": "What is average life expectancy in the countries where English is not the official language?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( Population ) FROM country WHERE Continent NOT IN ( SELECT Continent FROM country WHERE LocalName = \"English\" )", "predicted_parse_explanation": "['Step 1: find the Continent of country table for which LocalName equals English', 'Step 2: find the average Population in country table whose Continent not one of the results of step 1']", "feedback": "Supersede continent with name name , local name with countrylanguage's language , population with life expectancy , ensure countrylanguage's is official equals T in step 1", "context": "What is average life expectancy in the countries where English is not the official language? || select avg ( population ) from country where continent not in ( select continent from country where localname = 'English' ) || world_1 | country : lifeexpectancy, code | countrylanguage : countrycode, language ( \"english\" ) || Supersede continent with name name, local name with countrylanguage's language, population with life expectancy, ensure countrylanguage's is official equals T in step 1", "label": "world_1 | select avg ( lifeexpectancy ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' )" }, { "prediction": "student_transcripts_tracking | select other_student_details from students order by other_student_details desc", "gold_parse": "SELECT other_student_details FROM Students ORDER BY other_student_details DESC", "question": "List all the student details in reversed lexicographical order.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT * FROM Students ORDER BY date_left Desc", "predicted_parse_explanation": "['find the rows of Students table ordered descending by date_left']", "feedback": "Need to use other student details in place of date left .", "context": "List all the student details in reversed lexicographical order. || select * from students order by date_left desc || student_transcripts_tracking | students : other_student_details || Need to use other student details in place of date left.", "label": "student_transcripts_tracking | select other_student_details from students order by other_student_details desc" }, { "prediction": "car_1 | select model_list.model from model_list join cars_data on model_list.model = cars_data.model where cars_data.weight < 3500 except select model_list.model from model_list join cars_data on model_list.maker = cars_data.model where cars_data.make = 'Ford Motor Company'", "gold_parse": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company'", "question": "Which models are lighter than 3500 but not built by the 'Ford Motor Company'?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T1.Model FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T3.Weight > 3500 EXCEPT SELECT T1.Model FROM car_makers AS T4 JOIN model_list AS T1 ON T4.Id = T1.Maker WHERE T4.Maker = \"Ford Motor Company\"", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find model_list's Model of the results of step 1 whose Weight greater than 3500\", 'Step 3: For each row in car_makers table, find the corresponding rows in model_list table', \"Step 4: find model_list's Model of the results of step 3 whose car_makers's Maker equals Ford Motor Company\", 'Step 5: show the rows that are in the results of step 2 but not in the results of step 4']", "feedback": "In step 2 , weight should be less than 3500.", "context": "Which models are lighter than 3500 but not built by the 'Ford Motor Company'? || select model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.weight > 3500 except select model_list.model from car_makers join model_list on car_makers.id = model_list.maker where car_makers.maker = 'Ford Motor Company' || car_1 | model_list : model, maker | cars_data : model, weight ( 3500 ), make ( \"Ford Motor Company\" ) || In step 2, weight should be less than 3500.", "label": "car_1 | select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id join car_makers on model_list.maker = car_makers.id where cars_data.weight < 3500 and car_makers.fullname!= 'Ford Motor Company'" }, { "prediction": "tvshow | select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'", "gold_parse": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "question": "which countries' tv channels are playing some cartoon written by Todd Casey?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Todd Casey\" AND T2.Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find Country of the results of step 1 whose Written_by equals Todd Casey and Directed_by equals Ben Jones']", "feedback": "Skip \" and directed by as Ben Jones \".", "context": "which countries' tv channels are playing some cartoon written by Todd Casey? || select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey' and cartoon.directed_by = 'Ben Jones' || tvshow | tv_channel : country, id | cartoon : channel, written_by ( \"Todd Casey\" ) || Skip \" and directed by as Ben Jones \".", "label": "tvshow | select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" }, { "prediction": "wta_1 | select players.country_code, players.first_name from players join matches on players.player_id = matches.winner_id where matches.turner_name = 'WTA Championships' intersect select players.country_code, players.first_name from players join matches on players.player_id = matches.winner_id where matches.turner_name = 'Australian Open'", "gold_parse": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'", "question": "What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id WHERE T2.loser_ioc = \"WTA Championships\" INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id WHERE T2.loser_ioc = \"Australian Open\"", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find country_code, first_name of the results of step 1 whose loser_ioc equals WTA Championships', 'Step 3: find country_code, first_name of the results of step 1 whose loser_ioc equals Australian Open', 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "In step 2 and step 3 you need to have tourney name and make sure player id and winner id are equivalent.", "context": "What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open? || select players.country_code, players.first_name from players join matches on players.player_id = matches.loser_id where matches.loser_ioc = 'WTA Championships' intersect select players.country_code, players.first_name from players join matches on players.player_id = matches.loser_id where matches.loser_ioc = 'Australian Open' || wta_1 | players : country_code, first_name, player_id | matches : winner_id, tourney_name ( \"Australian Open\" ) || In step 2 and step 3 you need to have tourney name and make sure player id and winner id are equivalent.", "label": "wta_1 | select players.country_code, players.first_name from players join matches on players.player_id = matches.winner_id where matches.tourney_name = 'WTA Championships' intersect select players.country_code, players.first_name from players join matches on players.player_id = matches.winner_id where matches.tourney_name = 'Australian Open'" }, { "prediction": "concert_singer | select name, capacity from stadium order by avg ( average ) desc limit 1", "gold_parse": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1", "question": "What is the name and capacity for the stadium with highest average attendance?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Name , Capacity FROM stadium GROUP BY Stadium_ID ORDER BY Avg ( Average ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the average Average of each value of Stadium_ID in stadium table', 'Step 2: find Name, Capacity of stadium table with largest value in the results of step 1']", "feedback": "In step 1 just take average , no need to find average average .", "context": "What is the name and capacity for the stadium with highest average attendance? || select name, capacity from stadium group by stadium_id order by avg ( average ) desc limit 1 || concert_singer | stadium : name, capacity, average || In step 1 just take average, no need to find average average.", "label": "concert_singer | select name, capacity from stadium order by average desc limit 1" }, { "prediction": "dog_kennels | select professionals.professional_id, professionals.first_name, professionals.last_name, professionals.cell_number from professionals join treatments on professionals.professional_id = treatments.professional_id where professionals.state = 'Indiana' group by professionals.professional_id having count ( * ) > 2", "gold_parse": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2", "question": "Find the id, last name and cell phone of the professionals who live in the state of Indiana or have performed more than two treatments.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = \"Indiana\" UNION SELECT professional_id , last_name , cell_number FROM Professionals GROUP BY professional_id HAVING Count ( * ) > 2", "predicted_parse_explanation": "['Step 1: find the professional_id, last_name, cell_number of Professionals table for which state equals Indiana', 'Step 2: find the number of rows of each value of professional_id in Professionals table', 'Step 3: find professional_id, last_name, cell_number in Professionals table whose corresponding value in step 2 is greater than 2', 'Step 4: show the rows that are in any of the results of step 1 or the results of step 3']", "feedback": "We need to use treatments table instead of professionals table in step 2.", "context": "Find the id, last name and cell phone of the professionals who live in the state of Indiana or have performed more than two treatments. || select professional_id, last_name, cell_number from professionals where state = 'Indiana' union select professional_id, last_name, cell_number from professionals group by professional_id having count ( * ) > 2 || dog_kennels | professionals : professional_id, first_name, last_name, cell_number, state ( \"Indiana\" ) | treatments : professional_id || We need to use treatments table instead of professionals table in step 2.", "label": "dog_kennels | select professional_id, last_name, cell_number from professionals where state = 'Indiana' union select professionals.professional_id, professionals.last_name, professionals.cell_number from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) > 2" }, { "prediction": "concert_singer | select count ( * ) from singer", "gold_parse": "SELECT count(*) FROM singer", "question": "What is the total number of singers?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM stadium", "predicted_parse_explanation": "['find the number of rows in stadium table']", "feedback": "Supplant stadium table with singer table .", "context": "What is the total number of singers? || select count ( * ) from stadium || concert_singer | singer : || Supplant stadium table with singer table.", "label": "concert_singer | select count ( * ) from singer" }, { "prediction": "wta_1 | select sum ( rankings.ranking_points ), players.first_name from players join rankings on players.player_id = rankings.player_id group by players.player_id", "gold_parse": "SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "question": "Find the total ranking points for each player and their first name.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Sum ( T2.winner_rank ) , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T1.first_name", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find each value of first_name in the results of step 1 along with the summation of winner_rank of the corresponding rows to each value']", "feedback": "Replace matches with rankings in step 1 , replace winner rank with ranking points in step 2.", "context": "Find the total ranking points for each player and their first name. || select sum ( matches.winner_rank ), players.first_name from players join matches on players.player_id = matches.loser_id group by players.first_name || wta_1 | rankings : ranking_points, player_id | players : first_name, player_id || Replace matches with rankings in step 1, replace winner rank with ranking points in step 2.", "label": "wta_1 | select sum ( ranking_points ), players.first_name from players join rankings on players.player_id = rankings.player_id group by players.first_name" }, { "prediction": "world_1 | select countrycode from country where governmentform = 'Republic' except select countrycode from countrylanguage where language = 'English'", "gold_parse": "SELECT Code FROM country WHERE GovernmentForm != \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "question": "Return the codes of countries that do not speak English and do not have Republics for governments.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Code FROM country AS T1 WHERE T1.Continent = \"Republic\" EXCEPT SELECT T1.Code FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\"", "predicted_parse_explanation": "['Step 1: find the Code of country table for which Continent equals Republic', 'Step 2: For each row in country table, find the corresponding rows in countrylanguage table', 'Step 3: find Code of the results of step 2 whose Language equals English', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "In step 1 Use government form not equals Republic\" instead of \"Continent equals Republic\".", "context": "Return the codes of countries that do not speak English and do not have Republics for governments. || select country.code from country where country.continent = 'Republic' except select country.code from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' || world_1 | country : code, governmentform ( \"Republic\" ) | countrylanguage : countrycode, language ( \"English\" ) || In step 1 Use government form not equals Republic\" instead of \"Continent equals Republic\".", "label": "world_1 | select code from country where governmentform!= 'Republic' except select countrycode from countrylanguage where language = 'English'" }, { "prediction": "car_1 | select max ( mpg ) from cars_data where cylinders = 8 or year < 1980", "gold_parse": "SELECT mpg FROM CARS_DATA WHERE Cylinders = 8 OR YEAR < 1980 ORDER BY mpg DESC LIMIT 1", "question": "What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Max ( Accelerate ) FROM cars_data WHERE Cylinders = 1 OR Year < 8", "predicted_parse_explanation": "['find the maximum Accelerate in cars_data table whose Cylinders equals 1 or Year less than 8']", "feedback": "Use mpg in place of accelerate , Ensure cylinders equals 8 or year less than 1980.", "context": "What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980? || select max ( accelerate ) from cars_data where cylinders = 1 or year < 8 || car_1 | cars_data : mpg, cylinders ( 8 ), year ( 1980 ) || Use mpg in place of accelerate, Ensure cylinders equals 8 or year less than 1980.", "label": "car_1 | select mpg from cars_data where cylinders = 8 or year < 1980 order by mpg desc limit 1" }, { "prediction": "student_transcripts_tracking | select section_name from sections order by section_name desc", "gold_parse": "SELECT section_name FROM Sections ORDER BY section_name DESC", "question": "List the section_name in reversed lexicographical order.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT section_name FROM Sections ORDER BY section_name Asc", "predicted_parse_explanation": "['find the section_name of Sections table ordered ascending by section_name']", "feedback": "Ensure to find in descending order not in ascending order .", "context": "List the section_name in reversed lexicographical order. || select section_name from sections order by section_name asc || student_transcripts_tracking | sections : section_name || Ensure to find in descending order not in ascending order.", "label": "student_transcripts_tracking | select section_name from sections order by section_name desc" }, { "prediction": "concert_singer | select name, country, age from singer order by age desc", "gold_parse": "SELECT name , country , age FROM singer ORDER BY age DESC", "question": "Show name, country, age for all singers ordered by age from the oldest to the youngest.", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Name , Country , Age FROM singer ORDER BY Age Asc", "predicted_parse_explanation": "['find the Name, Country, Age of singer table ordered ascending by Age']", "feedback": "Swap ascending with descending .", "context": "Show name, country, age for all singers ordered by age from the oldest to the youngest. || select name, country, age from singer order by age asc || concert_singer | singer : name, country, age || Swap ascending with descending.", "label": "concert_singer | select name, country, age from singer order by age desc" }, { "prediction": "employee_hire_evaluation | select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id group by employee.employee_id order by count ( * ) desc limit 1", "gold_parse": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1", "question": "Which employee received the most awards in evaluations? Give me the employee name.", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT Name FROM employee GROUP BY Employee_ID ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Employee_ID in employee table', 'Step 2: find Name of employee table with largest value in the results of step 1']", "feedback": "In step 1 replace employee table with evaluation table .", "context": "Which employee received the most awards in evaluations? Give me the employee name. || select name from employee group by employee_id order by count ( * ) desc limit 1 || employee_hire_evaluation | employee : name, employee_id | evaluation : employee_id, year_awarded || In step 1 replace employee table with evaluation table.", "label": "employee_hire_evaluation | select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id group by evaluation.employee_id order by count ( * ) desc limit 1" }, { "prediction": "network_1 | select count ( distinct student_id ) from friend", "gold_parse": "SELECT student_id , count(*) FROM Friend GROUP BY student_id", "question": "How many friends does each student have?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Highschooler", "predicted_parse_explanation": "['find the number of rows in Highschooler table']", "feedback": "Find the number of rows in Friends table for each student .", "context": "How many friends does each student have? || select count ( * ) from highschooler || network_1 | friend : student_id || Find the number of rows in Friends table for each student.", "label": "network_1 | select student_id, count ( * ) from friend group by student_id" }, { "prediction": "dog_kennels | select treatment_types.treatment_type_description from treatment_types join treatments on treatment_types.treatment_type_code = treatments.treatment_type_code group by treatments.treatment_type_code order by sum ( treatments.cost_of_treatment ) asc limit 1", "gold_parse": "SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1", "question": "What is the description of the treatment type that costs the least money in total?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T1.treatment_type_description FROM Treatment_Types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T2.treatment_type_code ORDER BY Count ( * ) Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Treatment_Types table, find the corresponding rows in Treatments table', \"Step 2: find the number of rows of each value of Treatments's treatment_type_code in the results of step 1\", 'Step 3: find treatment_type_description of step 1 results with smallest value in the results of step 2']", "feedback": "Determine the whole date of treatment for each treatment type code in treatment table in step 2.", "context": "What is the description of the treatment type that costs the least money in total? || select treatment_types.treatment_type_description from treatment_types join treatments on treatment_types.treatment_type_code = treatments.treatment_type_code group by treatments.treatment_type_code order by count ( * ) asc limit 1 || dog_kennels | treatment_types : treatment_type_description, treatment_type_code | treatments : treatment_type_code, cost_of_treatment || Determine the whole date of treatment for each treatment type code in treatment table in step 2.", "label": "dog_kennels | select treatment_types.treatment_type_description from treatment_types join treatments on treatment_types.treatment_type_code = treatments.treatment_type_code group by treatment_types.treatment_type_code order by sum ( cost_of_treatment ) asc limit 1" }, { "prediction": "car_1 | select count ( * ) from cars_data where horsepower > 150", "gold_parse": "SELECT count(*) FROM CARS_DATA WHERE horsepower > 150", "question": "What is the number of the cars with horsepower more than 150?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM cars_data WHERE Cylinders > 150", "predicted_parse_explanation": "['find the number of rows in cars_data table whose Cylinders greater than 150']", "feedback": "i want horsepower not cylinders.", "context": "What is the number of the cars with horsepower more than 150? || select count ( * ) from cars_data where cylinders > 150 || car_1 | cars_data : horsepower ( 150 ) || i want horsepower not cylinders.", "label": "car_1 | select count ( * ) from cars_data where horsepower > 150" }, { "prediction": "world_1 | select city.name from city join country on city.countrycode = country.code join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language!= 'english'", "gold_parse": "SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')", "question": "What are the names of cities in Europe for which English is not the official language?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = \"T\" EXCEPT SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = \"Europe\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in city table', \"Step 2: find city's Name of the results of step 1 whose Continent equals T\", \"Step 3: find city's Name of the results of step 1 whose Continent equals Europe\", 'Step 4: show the rows that are in the results of step 2 but not in the results of step 3']", "feedback": "Add countrylanguage table , Ensure language not equals English and is official equals F in step 2 , show both results .", "context": "What are the names of cities in Europe for which English is not the official language? || select city.name from city join country on city.countrycode = country.code where country.continent = 'T' except select city.name from city join country on city.countrycode = country.code where country.continent = 'Europe' || world_1 | city : name, countrycode | country : code, continent ( \"Europe\" ) | countrylanguage : countrycode, language ( \"english\" ) || Add countrylanguage table, Ensure language not equals English and is official equals F in step 2, show both results.", "label": "world_1 | select distinct city.name from country join city on city.countrycode = country.code where country.continent = 'Europe' and country.name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'English' )" }, { "prediction": "world_1 | select count ( distinct country.continent ) from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Chinese'", "gold_parse": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", "question": "What is the number of distinct continents where Chinese is spoken?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Region ) FROM country WHERE Continent = \"Chinese\"", "predicted_parse_explanation": "['find the number of different Region in country table whose Continent equals Chinese']", "feedback": "use continent and language instead of region and continent respectively and also ensure it is spoken in country.", "context": "What is the number of distinct continents where Chinese is spoken? || select count ( distinct region ) from country where continent = 'Chinese' || world_1 | country : continent, code | countrylanguage : countrycode, language ( \"Chinese\" ) || use continent and language instead of region and continent respectively and also ensure it is spoken in country.", "label": "world_1 | select count ( distinct continent ) from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Chinese'" }, { "prediction": "employee_hire_evaluation | select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id group by employee.employee_id order by year_awarded desc limit 1", "gold_parse": "SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY count(*) DESC LIMIT 1", "question": "Which employee received the most awards in evaluations? Give me the employee name.", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT Name FROM employee GROUP BY Employee_ID ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Employee_ID in employee table', 'Step 2: find Name of employee table with largest value in the results of step 1']", "feedback": "I want table of evaluation in step 1.", "context": "Which employee received the most awards in evaluations? Give me the employee name. || select name from employee group by employee_id order by count ( * ) desc limit 1 || employee_hire_evaluation | employee : name, employee_id | evaluation : employee_id, year_awarded || I want table of evaluation in step 1.", "label": "employee_hire_evaluation | select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id group by evaluation.employee_id order by count ( * ) desc limit 1" }, { "prediction": "wta_1 | select first_name, country_code from players order by birth_date asc limit 1", "gold_parse": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1", "question": "Find the first name and country code of the oldest player.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT first_name , country_code FROM players ORDER BY birth_date Desc LIMIT 1", "predicted_parse_explanation": "['find the first_name, country_code of players table with largest value of birth_date']", "feedback": "Use smallest in place of largest.", "context": "Find the first name and country code of the oldest player. || select first_name, country_code from players order by birth_date desc limit 1 || wta_1 | players : first_name, country_code, birth_date || Use smallest in place of largest.", "label": "wta_1 | select first_name, country_code from players order by birth_date asc limit 1" }, { "prediction": "car_1 | select count ( * ) from car_makers join model_list on car_makers.id = model_list.modelid where car_makers.fulname = 'American Motor Company'", "gold_parse": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company'", "question": "How many car models were produced by the maker with full name American Motor Company?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM car_makers WHERE FullName = \"American Motor Company\" AND FullName = \"American Motor Company\"", "predicted_parse_explanation": "['find the number of rows in car_makers table whose FullName equals American Motor Company and FullName equals American Motor Company']", "feedback": "use model list table in place of car makers table and delete those last full name for which value is american motor company.", "context": "How many car models were produced by the maker with full name American Motor Company? || select count ( * ) from car_makers where fullname = 'American Motor Company' and fullname = 'American Motor Company' || car_1 | car_makers : id, fullname ( \"American Motor Company\" ) | model_list : modelid, maker || use model list table in place of car makers table and delete those last full name for which value is american motor company.", "label": "car_1 | select count ( * ) from car_makers join model_list on car_makers.id = model_list.maker where car_makers.fullname = 'American Motor Company'" }, { "prediction": "world_1 | select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Afghanistan'", "gold_parse": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", "question": "How many official languages are spoken in Afghanistan?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Code ) FROM country WHERE Continent = \"Afghanistan\"", "predicted_parse_explanation": "['find the number of different Code in country table whose Continent equals Afghanistan']", "feedback": "you need to find similar rows of countrylanguage having Afghanistan as the name of country.", "context": "How many official languages are spoken in Afghanistan? || select count ( distinct code ) from country where continent = 'Afghanistan' || world_1 | countrylanguage : language, countrycode | country : code, name ( \"Afghanistan\" ) || you need to find similar rows of countrylanguage having Afghanistan as the name of country.", "label": "world_1 | select count ( * ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Afghanistan' and isofficial = 'T'" }, { "prediction": "world_1 | select language, percentage from countrylanguage group by language order by percentage desc limit 1", "gold_parse": "SELECT LANGUAGE , CountryCode , max(Percentage) FROM countrylanguage GROUP BY CountryCode", "question": "What is the language spoken by the largest percentage of people in each country?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name , Continent FROM country GROUP BY Continent ORDER BY Max ( Population ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the maximum Population of each value of Continent in country table', 'Step 2: find Name, Continent of country table with largest value in the results of step 1']", "feedback": "you need to search the language of countrylanguage which are frequently used by population in that country.", "context": "What is the language spoken by the largest percentage of people in each country? || select name, continent from country group by continent order by max ( population ) desc limit 1 || world_1 | countrylanguage : language, percentage || you need to search the language of countrylanguage which are frequently used by population in that country.", "label": "world_1 | select language, countrycode, max ( percentage ) from countrylanguage group by countrycode" }, { "prediction": "wta_1 | select avg ( loser_age ), avg ( winner_age ) from matches", "gold_parse": "SELECT avg(loser_age) , avg(winner_age) FROM matches", "question": "Find the average age of losers and winners of all matches.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Avg ( loser_age ) , Avg ( loser_age ) FROM matches", "predicted_parse_explanation": "['find the average loser_age and the average loser_age in matches table']", "feedback": "You should use winner age in place of one of the loser age.", "context": "Find the average age of losers and winners of all matches. || select avg ( loser_age ), avg ( loser_age ) from matches || wta_1 | matches : loser_age, winner_age || You should use winner age in place of one of the loser age.", "label": "wta_1 | select avg ( loser_age ), avg ( winner_age ) from matches" }, { "prediction": "student_transcripts_tracking | select count ( distinct transcript_id ), student_enrolment_id from transcript_contents group by transcript_id", "gold_parse": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1", "question": "How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , course_id FROM Student_Enrolment_Courses GROUP BY course_id", "predicted_parse_explanation": "['find each value of course_id in Student_Enrolment_Courses table along with the number of the corresponding rows to each value']", "feedback": "Ensure course is enrolled by number of students in different transcripts .", "context": "How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id. || select count ( * ), course_id from student_enrolment_courses group by course_id || student_transcripts_tracking | transcript_contents : transcript_id, student_enrolment_id || Ensure course is enrolled by number of students in different transcripts.", "label": "student_transcripts_tracking | select count ( * ), student_course_id from transcript_contents group by student_course_id order by count ( * ) desc limit 1" }, { "prediction": "singer | select name from singer where birth_year = 1948 or birth_year = 1949", "gold_parse": "SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949", "question": "What are the names of the singers whose birth years are either 1948 or 1949?", "db_id": "singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "singer", "song" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Singer_ID", "Name", "Birth_Year", "Net_Worth_Millions", "Citizenship", "Song_ID", "Title", "Singer_ID", "Sales", "Highest_Position" ] }, "db_foreign_keys": { "column_id": [ 8 ], "other_column_id": [ 1 ] }, "predicted_parse_with_values": "SELECT Name FROM singer WHERE Citizenship = 1949 OR Citizenship = 1948", "predicted_parse_explanation": "['find Name of singer table whose Citizenship equals 1948 or Citizenship equals 1949']", "feedback": "You need to utilize year of birth.", "context": "What are the names of the singers whose birth years are either 1948 or 1949? || select name from singer where citizenship = 1949 or citizenship = 1948 || singer | singer : name, birth_year ( 1949 ) || You need to utilize year of birth.", "label": "singer | select name from singer where birth_year = 1948 or birth_year = 1949" }, { "prediction": "student_transcripts_tracking | select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id", "gold_parse": "SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id", "question": "What are all the course names of the courses which ever have students enrolled in?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name FROM Courses", "predicted_parse_explanation": "['find the course_name of Courses table']", "feedback": "Make sure id of course from courses' table available in student enrollment courses table.", "context": "What are all the course names of the courses which ever have students enrolled in? || select course_name from courses || student_transcripts_tracking | courses : course_name, course_id | student_enrolment_courses : course_id || Make sure id of course from courses' table available in student enrollment courses table.", "label": "student_transcripts_tracking | select distinct courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id" }, { "prediction": "cre_Doc_Template_Mgt | select template_id, version_number, template_type_code from templates", "gold_parse": "SELECT template_id , version_number , template_type_code FROM Templates", "question": "What are the ids, version numbers, and type codes for each template?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_ID , Version_Number , Template_Type_Code , Template_Type_Code FROM Templates", "predicted_parse_explanation": "['find the Template_ID, Version_Number, Template_Type_Code, Template_Type_Code of Templates table']", "feedback": "You should not use the \"Template Type Code\".", "context": "What are the ids, version numbers, and type codes for each template? || select template_id, version_number, template_type_code, template_type_code from templates || cre_Doc_Template_Mgt | templates : template_id, version_number, template_type_code || You should not use the \"Template Type Code\".", "label": "cre_Doc_Template_Mgt | select template_id, version_number, template_type_code from templates" }, { "prediction": "student_transcripts_tracking | select count ( * ) from courses", "gold_parse": "SELECT count(*) FROM Courses", "question": "How many courses are there?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Addresses", "predicted_parse_explanation": "['find the number of rows in Addresses table']", "feedback": "Need to find result from courses table not from addresses table .", "context": "How many courses are there? || select count ( * ) from addresses || student_transcripts_tracking | courses : || Need to find result from courses table not from addresses table.", "label": "student_transcripts_tracking | select count ( * ) from courses" }, { "prediction": "poker_player | select poker_player.money_rank from poker_player join people on poker_player.people_id = people.people_id order by people.height desc limit 1", "gold_parse": "SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1", "question": "Return the money rank of the poker player with the greatest height.", "db_id": "poker_player", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "poker_player", "people" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Poker_Player_ID", "People_ID", "Final_Table_Made", "Best_Finish", "Money_Rank", "Earnings", "People_ID", "Nationality", "Name", "Birth_Date", "Height" ] }, "db_foreign_keys": { "column_id": [ 2 ], "other_column_id": [ 7 ] }, "predicted_parse_with_values": "SELECT T1.Earnings FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in people table, find the corresponding rows in poker_player table', 'Step 2: find Earnings of the results of step 1 with largest value of Height']", "feedback": "earnings is wrong . Take money rank in place of it .", "context": "Return the money rank of the poker player with the greatest height. || select poker_player.earnings from poker_player join people on poker_player.people_id = people.people_id order by people.height desc limit 1 || poker_player | poker_player : money_rank, people_id | people : people_id, height || earnings is wrong. Take money rank in place of it.", "label": "poker_player | select poker_player.money_rank from people join poker_player on people.people_id = poker_player.people_id order by people.height desc limit 1" }, { "prediction": "car_1 | select avg ( mpg ) from cars_data where cylinders = 4", "gold_parse": "SELECT avg(mpg) FROM CARS_DATA WHERE Cylinders = 4", "question": "What is the average miles per gallon of all the cards with 4 cylinders?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Avg ( T3.Accelerate ) FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T1.Model = 4", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find the average Accelerate in the results of step 1 whose model_list's Model equals 4\"]", "feedback": "Change accelerate with mpg and model list's model with cars data's cylinders .", "context": "What is the average miles per gallon of all the cards with 4 cylinders? || select avg ( cars_data.accelerate ) from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where model_list.model = 4 || car_1 | cars_data : mpg, cylinders ( 4 ) || Change accelerate with mpg and model list's model with cars data's cylinders.", "label": "car_1 | select avg ( mpg ) from cars_data where cylinders = 4" }, { "prediction": "pets_1 | select pettype, weight from pets order by pet_age asc limit 1", "gold_parse": "SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1", "question": "What type of pet is the youngest animal, and how much does it weigh?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT PetType , pet_age FROM Pets ORDER BY pet_age Asc LIMIT 1", "predicted_parse_explanation": "['find the PetType, pet_age of Pets table with smallest value of pet_age']", "feedback": "Need to change pet age with weight .", "context": "What type of pet is the youngest animal, and how much does it weigh? || select pettype, pet_age from pets order by pet_age asc limit 1 || pets_1 | pets : pettype, weight, pet_age || Need to change pet age with weight.", "label": "pets_1 | select pettype, weight from pets order by pet_age asc limit 1" }, { "prediction": "flight_2 | select flights.flightno from airlines join flights on airlines.uid = flights.airline where airlines.airline = 'United Airlines'", "gold_parse": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"", "question": "Which flight numbers correspond to United Airlines flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T2.FlightNo FROM airlines AS T1 JOIN flights AS T2 WHERE T1.Country = \"United Airlines\" AND T1.Airline = \"United Airlines\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in flights table', \"Step 2: find FlightNo of the results of step 1 whose Country equals United Airlines and airlines's Airline equals United Airlines\"]", "feedback": "Remove country equals United airlines .", "context": "Which flight numbers correspond to United Airlines flights? || select flights.flightno from airlines join flights where airlines.country = 'United Airlines' and airlines.airline = 'United Airlines' || flight_2 | flights : flightno, airline | airlines : uid, airline ( \"United Airlines\" ) || Remove country equals United airlines.", "label": "flight_2 | select flights.flightno from flights join airlines on airlines.uid = flights.airline where airlines.airline = 'United Airlines'" }, { "prediction": "world_1 | select name from country where surfacearea > ( select min ( surfacearea ) from country where continent = 'Europe' )", "gold_parse": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")", "question": "Which countries have greater area than that of any country in Europe?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE SurfaceArea > ( SELECT SurfaceArea FROM country WHERE Region = \"Europe\" )", "predicted_parse_explanation": "['Step 1: find the SurfaceArea of country table for which Region equals Europe', 'Step 2: find the Continent of country table whose SurfaceArea greater than the results of step 1']", "feedback": "In step 1 Exchange region with continent , In step 2 Exchange continent with name name .", "context": "Which countries have greater area than that of any country in Europe? || select continent from country where surfacearea > ( select surfacearea from country where region = 'Europe' ) || world_1 | country : name, surfacearea, continent ( \"Europe\" ) || In step 1 Exchange region with continent, In step 2 Exchange continent with name name.", "label": "world_1 | select name from country where surfacearea > ( select min ( surfacearea ) from country where continent = 'Europe' )" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG' intersect select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\"", "question": "Which airlines have departing flights from both APG and CVO airports?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.Airline FROM airlines AS T1 WHERE T1.Country = \"APG\" INTERSECT SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"CVO\"", "predicted_parse_explanation": "[\"Step 1: find the Airline of airlines table for which airlines's Country equals APG\", 'Step 2: For each row in airlines table, find the corresponding rows in airports table', \"Step 3: find Airline of the results of step 2 whose airports's Country equals CVO\", 'Step 4: show the rows that are in both the results of step 1 and the results of step 3']", "feedback": "in step 1 and 3, you should use source airport of flights in place or country of airlines and country of airports. ", "context": "Which airlines have departing flights from both APG and CVO airports? || select airlines.airline from airlines where airlines.country = 'APG' intersect select airlines.airline from airlines join airports where airports.country = 'CVO' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"CVO\" ) || in step 1 and 3, you should use source airport of flights in place or country of airlines and country of airports.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG' intersect select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO'" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.friend_id join highschooler on friend.student_id = highschooler.id where highschooler.name = 'Kyle'", "gold_parse": "SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = \"Kyle\"", "question": "Show the names of all of the high schooler Kyle's friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler WHERE grade = \"Kyle\"", "predicted_parse_explanation": "['find the name of Highschooler table for which grade equals Kyle']", "feedback": "You need to find names of high schooler whose friend is Kyle and ID must exist in table of friend.", "context": "Show the names of all of the high schooler Kyle's friends. || select name from highschooler where grade = 'Kyle' || network_1 | highschooler : name, id | friend : friend_id, student_id | highschooler : id, name ( \"Kyle\" ) || You need to find names of high schooler whose friend is Kyle and ID must exist in table of friend.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id join highschooler on friend.friend_id = highschooler.id where highschooler.name = 'Kyle'" }, { "prediction": "tvshow | select air_date from tv_series where episode = 'A Love of a Lifetime'", "gold_parse": "SELECT Air_Date FROM TV_series WHERE Episode = \"A Love of a Lifetime\"", "question": "What is the air date of TV series with Episode \"A Love of a Lifetime\"?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Air_Date , Episode FROM TV_series WHERE Episode = \"A Love of a Lifetime\"", "predicted_parse_explanation": "['find the Air_Date, Episode of TV_series table for which Episode equals A Love of a Lifetime']", "feedback": "Only need to find air date .", "context": "What is the air date of TV series with Episode \"A Love of a Lifetime\"? || select air_date, episode from tv_series where episode = 'A Love of a Lifetime' || tvshow | tv_series : air_date, episode ( \"A Love of a Lifetime\" ) || Only need to find air date.", "label": "tvshow | select air_date from tv_series where episode = 'A Love of a Lifetime'" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.student_id join likes on friend.friend_id = likes.student_id intersect select highschooler.name from highschooler join likes on highschooler.id = likes.student_id join friend on likes.friend_id = friend.friend_id", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", "question": "Show name of all students who have some friends and also are liked by someone else.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler INTERSECT SELECT name FROM Highschooler", "predicted_parse_explanation": "['Step 1: find the name of Highschooler table', 'Step 2: find the name of Highschooler table', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "In steep 1 and 2 , You need to make sure that similar id of student are available in friend as well as in likes table.", "context": "Show name of all students who have some friends and also are liked by someone else. || select name from highschooler intersect select name from highschooler || network_1 | highschooler : name, id | friend : student_id, friend_id | likes : student_id || In steep 1 and 2, You need to make sure that similar id of student are available in friend as well as in likes table.", "label": "network_1 | select highschooler.name from friend join highschooler on likes.student_id = highschooler.id intersect select highschooler.name from likes join highschooler on likes.liked_id = highschooler.id" }, { "prediction": "employee_hire_evaluation | select shop.name, count ( * ) from hiring join shop on hiring.shop_id = shop.shop_id group by shop.name", "gold_parse": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name", "question": "Find the number of employees hired in each shop; show the shop name as well.", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , T1.Name FROM shop AS T1 JOIN hiring AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T2.Shop_ID", "predicted_parse_explanation": "['Step 1: For each row in shop table, find the corresponding rows in hiring table', \"Step 2: find each value of hiring's Shop_ID in the results of step 1 along with the number of the corresponding rows to each value\"]", "feedback": "Need to use name and look for rows which are equivalent in hiring table.", "context": "Find the number of employees hired in each shop; show the shop name as well. || select count ( * ), shop.name from shop join hiring on shop.shop_id = hiring.shop_id group by hiring.shop_id || employee_hire_evaluation | shop : name, shop_id | hiring : shop_id || Need to use name and look for rows which are equivalent in hiring table.", "label": "employee_hire_evaluation | select count ( * ), shop.name from hiring join shop on hiring.shop_id = shop.shop_id group by shop.name" }, { "prediction": "course_teach | select count ( * ) from teacher", "gold_parse": "SELECT count(*) FROM teacher", "question": "What is the total count of teachers?", "db_id": "course_teach", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "course", "teacher", "course_arrange" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2 ], "column_name": [ "*", "Course_ID", "Staring_Date", "Course", "Teacher_ID", "Name", "Age", "Hometown", "Course_ID", "Teacher_ID", "Grade" ] }, "db_foreign_keys": { "column_id": [ 9, 8 ], "other_column_id": [ 4, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM course", "predicted_parse_explanation": "['find the number of rows in course table']", "feedback": "Exchange course table with teacher table .", "context": "What is the total count of teachers? || select count ( * ) from course || course_teach | teacher : || Exchange course table with teacher table.", "label": "course_teach | select count ( * ) from teacher" }, { "prediction": "tvshow | select production_code, channel from cartoon order by original_air_date asc limit 1", "gold_parse": "SELECT production_code , channel FROM cartoon ORDER BY original_air_date LIMIT 1", "question": "Find the production code and channel of the most recently aired cartoon.", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Production_code , Channel FROM Cartoon GROUP BY Channel ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Channel in Cartoon table', 'Step 2: find Production_code, Channel of Cartoon table with largest value in the results of step 1']", "feedback": "You need to show the production code and channel of cartoon whose original air date is the lowest.", "context": "Find the production code and channel of the most recently aired cartoon. || select production_code, channel from cartoon group by channel order by count ( * ) desc limit 1 || tvshow | cartoon : production_code, channel, original_air_date || You need to show the production code and channel of cartoon whose original air date is the lowest.", "label": "tvshow | select production_code, channel from cartoon order by original_air_date asc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select version_number, template_type_code from templates where date_effective_from < 5", "gold_parse": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5", "question": "What is the version number and template type code for the template with version number later than 5?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_Details , Template_Type_Code FROM Templates WHERE Version_Number > 5", "predicted_parse_explanation": "['find the Template_Details, Template_Type_Code of Templates table for which Version_Number greater than 5']", "feedback": "We have to use version number instead of template details.", "context": "What is the version number and template type code for the template with version number later than 5? || select template_details, template_type_code from templates where version_number > 5 || cre_Doc_Template_Mgt | templates : version_number, template_type_code, date_effective_from ( 5 ) || We have to use version number instead of template details.", "label": "cre_Doc_Template_Mgt | select version_number, template_type_code from templates where version_number > 5" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT'", "gold_parse": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'", "question": "Count the number of documents that use the PPT template type.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Templates WHERE Template_Type_Code = \"PPT\"", "predicted_parse_explanation": "['find the number of rows in Templates table whose Template_Type_Code equals PPT']", "feedback": "Use documents table instead of templates table .", "context": "Count the number of documents that use the PPT template type. || select count ( * ) from templates where template_type_code = 'PPT' || cre_Doc_Template_Mgt | documents : template_id | templates : template_id, template_type_code ( \"PPT\" ) || Use documents table instead of templates table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT'" }, { "prediction": "flight_2 | select airports.city from airports join flights on airports.airportcode = flights.destairport group by airports.city order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "question": "Which city has most number of departing flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT City FROM airports GROUP BY City ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of City in airports table', 'Step 2: find City of airports table with largest value in the results of step 1']", "feedback": "in the flight's table, you should use country's short form for those city.", "context": "Which city has most number of departing flights? || select city from airports group by city order by count ( * ) desc limit 1 || flight_2 | airports : city, airportcode | flights : destairport || in the flight's table, you should use country's short form for those city.", "label": "flight_2 | select airports.city from airports join flights on airports.airportcode = flights.sourceairport group by airports.city order by count ( * ) desc limit 1" }, { "prediction": "dog_kennels | select first_name, last_name, email_address from owners where state like '%North%'", "gold_parse": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'", "question": "Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT first_name , last_name , email_address FROM Owners WHERE first_name LIKE \"North\"", "predicted_parse_explanation": "['find the first_name, last_name, email_address of Owners table for which first_name contains North']", "feedback": "Take \"state contains North\" instead of first name contains North\".", "context": "Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email. || select first_name, last_name, email_address from owners where first_name like 'North' || dog_kennels | owners : first_name, last_name, email_address, state ( \"%North%\" ) || Take \"state contains North\" instead of first name contains North\".", "label": "dog_kennels | select first_name, last_name, email_address from owners where state like '%North%'" }, { "prediction": "wta_1 | select count ( * ) from matches", "gold_parse": "SELECT count(*) FROM matches", "question": "Find the total number of matches.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM players", "predicted_parse_explanation": "['find the number of rows in players table']", "feedback": "Replace players table with matches table .", "context": "Find the total number of matches. || select count ( * ) from players || wta_1 | matches : || Replace players table with matches table.", "label": "wta_1 | select count ( * ) from matches" }, { "prediction": "wta_1 | select count ( * ) from matches where year = 2013 or year = 2016", "gold_parse": "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016", "question": "List the number of all matches who played in years of 2013 or 2016.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM matches WHERE year > = 2013", "predicted_parse_explanation": "['find the number of rows in matches table whose year greater than or equals 2013']", "feedback": "It should be 2013 or 2016.", "context": "List the number of all matches who played in years of 2013 or 2016. || select count ( * ) from matches where year > = 2013 || wta_1 | matches : year ( 2013, 2016 ) || It should be 2013 or 2016.", "label": "wta_1 | select count ( * ) from matches where year = 2013 or year = 2016" }, { "prediction": "cre_Doc_Template_Mgt | select documents.document_id, documents.document_name from documents join paragraphs on documents.document_id = paragraphs.document_id group by documents.document_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the document id and name with greatest number of paragraphs?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID , Document_Name FROM Documents GROUP BY Document_ID ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Document_ID in Documents table', 'Step 2: find Document_ID, Document_Name of Documents table with largest value in the results of step 1']", "feedback": "Need to change documents table with paragraphs table in step 1.", "context": "What is the document id and name with greatest number of paragraphs? || select document_id, document_name from documents group by document_id order by count ( * ) desc limit 1 || cre_Doc_Template_Mgt | documents : document_id, document_name | paragraphs : document_id || Need to change documents table with paragraphs table in step 1.", "label": "cre_Doc_Template_Mgt | select paragraphs.document_id, documents.document_name from paragraphs join documents on paragraphs.document_id = documents.document_id group by paragraphs.document_id order by count ( * ) desc limit 1" }, { "prediction": "network_1 | select avg ( grade ) from highschooler where id in ( select student_id from friend )", "gold_parse": "SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "question": "What is the average grade of students who have friends?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Avg ( grade ) FROM Highschooler", "predicted_parse_explanation": "['find the average grade in Highschooler table']", "feedback": "Every pupils must have friends.", "context": "What is the average grade of students who have friends? || select avg ( grade ) from highschooler || network_1 | highschooler : grade, id | friend : student_id || Every pupils must have friends.", "label": "network_1 | select avg ( grade ) from highschooler where id in ( select friend.student_id from friend join highschooler on friend.student_id = highschooler.id )" }, { "prediction": "world_1 | select distinct city.name from country join country on city.countrycode = country.code join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'Chinese' and country.continent = 'Asia'", "gold_parse": "SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode JOIN city AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = \"Asia\"", "question": "Whic`h unique cities are in Asian countries where Chinese is the official language?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.District FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = \"T\" AND T2.LocalName = \"Chinese\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in city table', 'Step 2: find District of the results of step 1 whose Continent equals T and LocalName equals Chinese']", "feedback": "you need to use city, is official and language in place of district, local name and local name respectively. also, verify that asia is used as the local name.", "context": "Which unique cities are in Asian countries where Chinese is the official language? || select city.district from city join country on city.countrycode = country.code where country.continent = 'T' and country.localname = 'Chinese' || world_1 | city : name, countrycode | country : code, continent ( \"Asia\" ) | countrylanguage : countrycode, language ( \"Chinese\" ) || you need to use city, is official and language in place of district, local name and local name respectively. also, verify that asia is used as the local name.", "label": "world_1 | select distinct city.name from country join countrylanguage on country.code = countrylanguage.countrycode join city on country.code = city.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'Chinese' and country.continent = 'Asia'" }, { "prediction": "dog_kennels | select count ( distinct dog_id ) from treatments", "gold_parse": "SELECT count(DISTINCT dog_id) FROM Treatments", "question": "Count the number of dogs that went through a treatment.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Breeds", "predicted_parse_explanation": "['find the number of rows in Breeds table']", "feedback": "You should find the number of rows in treatment table.", "context": "Count the number of dogs that went through a treatment. || select count ( * ) from breeds || dog_kennels | treatments : dog_id || You should find the number of rows in treatment table.", "label": "dog_kennels | select count ( distinct dog_id ) from treatments" }, { "prediction": "cre_Doc_Template_Mgt | select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland'", "gold_parse": "SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'", "question": "Show the document id with paragraph text 'Brazil' and 'Ireland'.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID FROM Documents WHERE Document_Name LIKE \"Ireland\"", "predicted_parse_explanation": "['find the Document_ID of Documents table for which Document_Name contains Ireland']", "feedback": "You should only use the paragraph text which contains Brazil and Ireland.", "context": "Show the document id with paragraph text 'Brazil' and 'Ireland'. || select document_id from documents where document_name like 'Ireland' || cre_Doc_Template_Mgt | paragraphs : document_id, paragraph_text ( \"Ireland\" ) || You should only use the paragraph text which contains Brazil and Ireland.", "label": "cre_Doc_Template_Mgt | select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland'" }, { "prediction": "student_transcripts_tracking | select course_description from courses where course_id = ( select course_id from courses where course_name ='math' )", "gold_parse": "SELECT course_description FROM Courses WHERE course_name = 'math'", "question": "How is the math course described?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Courses WHERE course_name = \"math\"", "predicted_parse_explanation": "['find the number of rows in Courses table whose course_name equals math']", "feedback": "Find course description whose course name equals math .", "context": "How is the math course described? || select count ( * ) from courses where course_name ='math' || student_transcripts_tracking | courses : course_description, course_id, course_name ( \"math\" ) || Find course description whose course name equals math.", "label": "student_transcripts_tracking | select course_description from courses where course_name ='math'" }, { "prediction": "network_1 | select count ( * ) from likes join highschooler on likes.student_id = highschooler.id where highschooler.name = 'Kyle'", "gold_parse": "SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "question": "Return the number of likes that the high schooler named Kyle has.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Highschooler WHERE grade = \"Kyle\"", "predicted_parse_explanation": "['find the number of rows in Highschooler table whose grade equals Kyle']", "feedback": "You need to use likes table and grade.", "context": "Return the number of likes that the high schooler named Kyle has. || select count ( * ) from highschooler where grade = 'Kyle' || network_1 | likes : student_id | highschooler : id, name ( \"Kyle\" ) || You need to use likes table and grade.", "label": "network_1 | select count ( * ) from likes join highschooler on likes.student_id = highschooler.id where highschooler.name = 'Kyle'" }, { "prediction": "network_1 | select avg ( grade ) from highschooler where id in ( select student_id from friend )", "gold_parse": "SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "question": "What is the average grade of students who have friends?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Avg ( grade ) FROM Highschooler", "predicted_parse_explanation": "['find the average grade in Highschooler table']", "feedback": "Be sure that students have friends .", "context": "What is the average grade of students who have friends? || select avg ( grade ) from highschooler || network_1 | highschooler : grade, id | friend : student_id || Be sure that students have friends.", "label": "network_1 | select avg ( grade ) from highschooler where id in ( select friend.student_id from friend join highschooler on friend.student_id = highschooler.id )" }, { "prediction": "dog_kennels | select name, age, weight from dogs where abandoned_yn = 0", "gold_parse": "SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1", "question": "What are the dog name, age and weight of the dogs that were abandoned? Note that 1 stands for yes, and 0 stands for no in the tables.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT name , age , weight FROM Dogs WHERE weight IN ( SELECT weight FROM Dogs )", "predicted_parse_explanation": "['Step 1: find the weight of Dogs table', 'Step 2: find the name, age, weight of Dogs table whose weight one of the results of step 1']", "feedback": "Display name , age , weight of dogs whose abandoned yes or no equals 1.", "context": "What are the dog name, age and weight of the dogs that were abandoned? Note that 1 stands for yes, and 0 stands for no in the tables. || select name, age, weight from dogs where weight in ( select weight from dogs ) || dog_kennels | dogs : name, age, weight, abandoned_yn ( 0 ) || Display name, age, weight of dogs whose abandoned yes or no equals 1.", "label": "dog_kennels | select name, age, weight from dogs where abandoned_yn = 1" }, { "prediction": "cre_Doc_Template_Mgt | select count ( distinct paragraphs.paragraph_id ) from documents join paragraphs on documents.document_id = paragraphs.document_id where documents.document_name = 'Summer Show'", "gold_parse": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", "question": "Count the number of paragraphs in the document named 'Summer Show'.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Documents WHERE Document_Name LIKE \"Summer Show\"", "predicted_parse_explanation": "['find the number of rows in Documents table whose Document_Name contains Summer Show']", "feedback": "From Documents table name of the document should have Summer show which is equivalent to Document ID's and look its figure of paragraphs table.", "context": "Count the number of paragraphs in the document named 'Summer Show'. || select count ( * ) from documents where document_name like 'Summer Show' || cre_Doc_Template_Mgt | paragraphs : paragraph_id, document_id | documents : document_id, document_name ( \"Summer Show\" ) || From Documents table name of the document should have Summer show which is equivalent to Document ID's and look its figure of paragraphs table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Summer Show'" }, { "prediction": "flight_2 | select count ( * ) from airports", "gold_parse": "SELECT count(*) FROM AIRPORTS", "question": "How many airports do we have?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines", "predicted_parse_explanation": "['find the number of rows in airlines table']", "feedback": "Use airports table instead of airlines table .", "context": "How many airports do we have? || select count ( * ) from airlines || flight_2 | airports : || Use airports table instead of airlines table.", "label": "flight_2 | select count ( * ) from airports" }, { "prediction": "network_1 | select name from highschooler except select highschooler.name from highschooler join friend on highschooler.id = friend.student_id", "gold_parse": "SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id", "question": "What are the names of students who have no friends?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.name FROM Highschooler AS T1 WHERE T1.ID NOT IN ( SELECT T2.student_id FROM Likes AS T2 )", "predicted_parse_explanation": "['Step 1: find the student_id of Likes table', 'Step 2: find the name of Highschooler table whose ID not one of the results of step 1']", "feedback": "In step 1 Take friend table in place of likes table .", "context": "What are the names of students who have no friends? || select highschooler.name from highschooler where highschooler.id not in ( select likes.student_id from likes ) || network_1 | highschooler : name, id | friend : student_id || In step 1 Take friend table in place of likes table.", "label": "network_1 | select name from highschooler except select highschooler.name from friend join highschooler on friend.student_id = highschooler.id" }, { "prediction": "student_transcripts_tracking | select departments.department_name, count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id group by departments.department_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.department_name , T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY count(*) DESC LIMIT 1", "question": "For each department id, what is the name of the department with the most number of degrees?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T1.department_name , Count ( * ) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Departments table, find the corresponding rows in Degree_Programs table', \"Step 2: for each value of Degree_Programs's department_id in the results of step 1, calculate number of rows\", \"Step 3: show each value of Degree_Programs's department_id in the results of step 1 along with the number of rows with largest value in the results of step 2\"]", "feedback": "Additionally, search for name of department in step 3.", "context": "For each department id, what is the name of the department with the most number of degrees? || select departments.department_name, count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id group by degree_programs.department_id order by count ( * ) desc limit 1 || student_transcripts_tracking | departments : department_name, department_id | degree_programs : department_id || Additionally, search for name of department in step 3.", "label": "student_transcripts_tracking | select departments.department_name, degree_programs.department_id from degree_programs join departments on degree_programs.department_id = departments.department_id group by degree_programs.department_id order by count ( * ) desc limit 1" }, { "prediction": "orchestra | select conductor.name, orchestra.orchestral from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id", "gold_parse": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", "question": "Show the names of conductors and the orchestras they have conducted.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT T1.Name , T2.Year_of_Founded FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", "predicted_parse_explanation": "['Step 1: For each row in conductor table, find the corresponding rows in orchestra table', 'Step 2: find Name, Year_of_Founded of the results of step 1']", "feedback": "You need to find orchestra.", "context": "Show the names of conductors and the orchestras they have conducted. || select conductor.name, orchestra.year_of_founded from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id || orchestra | conductor : name, conductor_id | orchestra : orchestra, conductor_id || You need to find orchestra.", "label": "orchestra | select conductor.name, orchestra.orchestra from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id" }, { "prediction": "cre_Doc_Template_Mgt | select document_id, document_name, document_description from documents", "gold_parse": "SELECT document_id , document_name , document_description FROM Documents", "question": "What are the ids, names, and descriptions for all documents?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T3.Document_ID , T3.Document_Name , T1.Template_Type_Description FROM Ref_Template_Types AS T1 JOIN Templates AS T2 ON T1.Template_Type_Code = T2.Template_Type_Code JOIN Documents AS T3 ON T2.Template_ID = T3.Template_ID", "predicted_parse_explanation": "['Step 1: For each row in Templates table, find corresponding rows in Ref_Template_Types table and in Documents table', 'Step 2: find Document_ID, Document_Name, Template_Type_Description of the results of step 1']", "feedback": "Use document description in place of template type description .", "context": "What are the ids, names, and descriptions for all documents? || select documents.document_id, documents.document_name, ref_template_types.template_type_description from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code join documents on templates.template_id = documents.template_id || cre_Doc_Template_Mgt | documents : document_id, document_name, document_description || Use document description in place of template type description.", "label": "cre_Doc_Template_Mgt | select document_id, document_name, document_description from documents" }, { "prediction": "network_1 | select avg ( grade ) from highschooler where id in ( select student_id from friend )", "gold_parse": "SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "question": "Find the average grade of all students who have some friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Avg ( grade ) FROM Highschooler", "predicted_parse_explanation": "['find the average grade in Highschooler table']", "feedback": "Make sure to refer that id of Highschooler are available in friend table.", "context": "Find the average grade of all students who have some friends. || select avg ( grade ) from highschooler || network_1 | highschooler : grade, id | friend : student_id || Make sure to refer that id of Highschooler are available in friend table.", "label": "network_1 | select avg ( grade ) from highschooler where id in ( select friend.student_id from friend join highschooler on friend.student_id = highschooler.id )" }, { "prediction": "battle_death | select name, result, bulgarian_commander from battle where id not in ( select lost_in_battle from ship where location = 'English Channel' )", "gold_parse": "SELECT name , RESULT , bulgarian_commander FROM battle EXCEPT SELECT T1.name , T1.result , T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'", "question": "Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT T1.name , T1.result , T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name ! = \"English Channel\"", "predicted_parse_explanation": "['Step 1: For each row in battle table, find the corresponding rows in ship table', \"Step 2: find battle's name, result, bulgarian_commander of the results of step 1 whose ship's name not equals English Channel\"]", "feedback": "In step 2 , Make sure location should not equivalent with English channel.", "context": "Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'. || select battle.name, battle.result, battle.bulgarian_commander from battle join ship on battle.id = ship.lost_in_battle where ship.name! = 'English Channel' || battle_death | battle : name, result, bulgarian_commander, id | ship : lost_in_battle, location ( \"English Channel\" ) || In step 2, Make sure location should not equivalent with English channel.", "label": "battle_death | select name, result, bulgarian_commander from battle except select battle.name, battle.result, battle.bulgarian_commander from battle join ship on battle.id = ship.lost_in_battle where ship.location = 'English Channel'" }, { "prediction": "world_1 | select sum ( population ) from city where district = 'Gelderland'", "gold_parse": "SELECT sum(Population) FROM city WHERE District = \"Gelderland\"", "question": "What is the total population of Gelderland district?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Sum ( Population ) FROM country", "predicted_parse_explanation": "['find the summation of Population in country table']", "feedback": "Make sure that district equals Gelderland .", "context": "What is the total population of Gelderland district? || select sum ( population ) from country || world_1 | city : population, district ( \"Gelderland\" ) || Make sure that district equals Gelderland.", "label": "world_1 | select sum ( population ) from city where district = 'Gelderland'" }, { "prediction": "car_1 | select car_names.model from cars_data join car_names on cars_data.id = car_names.id order by cars_data.mpg desc limit 1", "gold_parse": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1", "question": "What is the car wmodel with the highest mpg?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Edispl FROM cars_data ORDER BY Weight Desc LIMIT 1", "predicted_parse_explanation": "['find the Edispl of cars_data table with largest value of Weight']", "feedback": "I want model, car names table and mpg.", "context": "What is the car wmodel with the highest mpg? || select edispl from cars_data order by weight desc limit 1 || car_1 | car_names : model, id | cars_data : id, mpg || I want model, car names table and mpg.", "label": "car_1 | select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id order by cars_data.mpg desc limit 1" }, { "prediction": "world_1 | select avg ( lifeexpectancy ) from country where governmentform = 'Republic' and continent = 'Africa'", "gold_parse": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", "question": "What is the average life expectancy in African countries that are republics?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( LifeExpectancy ) FROM country WHERE Continent = \"Africa\"", "predicted_parse_explanation": "['find the average LifeExpectancy in country table whose Continent equals Africa']", "feedback": "Be certain that those contries have Republic in their government form .", "context": "What is the average life expectancy in African countries that are republics? || select avg ( lifeexpectancy ) from country where continent = 'Africa' || world_1 | country : lifeexpectancy, governmentform ( \"Republic\" ), continent ( \"Africa\" ) || Be certain that those contries have Republic in their government form.", "label": "world_1 | select avg ( lifeexpectancy ) from country where continent = 'Africa' and governmentform = 'Republic'" }, { "prediction": "dog_kennels | select count ( distinct dog_id ) from treatments", "gold_parse": "SELECT count(DISTINCT dog_id) FROM Treatments", "question": "How many dogs went through any treatments?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Breeds", "predicted_parse_explanation": "['find the number of rows in Breeds table']", "feedback": "You need to use table of treatments.", "context": "How many dogs went through any treatments? || select count ( * ) from breeds || dog_kennels | treatments : dog_id || You need to use table of treatments.", "label": "dog_kennels | select count ( distinct dog_id ) from treatments" }, { "prediction": "network_1 | select count ( * ), highschooler.name from highschooler join likes on highschooler.id = likes.student_id group by highschooler.id", "gold_parse": "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "question": "What are the names of high schoolers who have likes, and how many likes does each have?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , grade FROM Highschooler GROUP BY grade", "predicted_parse_explanation": "['find each value of grade in Highschooler table along with the number of the corresponding rows to each value']", "feedback": "You need to replace name in place of grade and also search correlated row in likes table to id of Highschooler's.", "context": "What are the names of high schoolers who have likes, and how many likes does each have? || select count ( * ), grade from highschooler group by grade || network_1 | highschooler : name, id | likes : student_id || You need to replace name in place of grade and also search correlated row in likes table to id of Highschooler's.", "label": "network_1 | select highschooler.name, count ( * ) from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id" }, { "prediction": "network_1 | select id from highschooler where name = 'Kyle'", "gold_parse": "SELECT ID FROM Highschooler WHERE name = \"Kyle\"", "question": "Show the ID of the high schooler named Kyle.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT ID FROM Highschooler WHERE grade = \"Kyle\"", "predicted_parse_explanation": "['find the ID of Highschooler table for which grade equals Kyle']", "feedback": "Need to put name on behalf of grade.", "context": "Show the ID of the high schooler named Kyle. || select id from highschooler where grade = 'Kyle' || network_1 | highschooler : id, name ( \"Kyle\" ) || Need to put name on behalf of grade.", "label": "network_1 | select id from highschooler where name = 'Kyle'" }, { "prediction": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French'", "gold_parse": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"", "question": "What are the names of nations speak both English and French?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in countrylanguage table', 'Step 2: find Continent of the results of step 1 whose Language equals English', 'Step 3: find Continent of the results of step 1 whose Language equals French', 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "In step 2 and 3 , replace continent with name name .", "context": "What are the names of nations speak both English and French? || select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' || world_1 | country : name, code | countrylanguage : countrycode, language ( \"French\" ) || In step 2 and 3, replace continent with name name.", "label": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French'" }, { "prediction": "world_1 | select count ( distinct governmentform ) from country where continent = 'Africa'", "gold_parse": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"", "question": "How many different forms of governments are there in Africa?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Code2 ) FROM country WHERE Continent = \"Africa\"", "predicted_parse_explanation": "['find the number of different Code2 in country table whose Continent equals Africa']", "feedback": "Use government form as code 2 is false.", "context": "How many different forms of governments are there in Africa? || select count ( distinct code2 ) from country where continent = 'Africa' || world_1 | country : governmentform, continent ( \"Africa\" ) || Use government form as code 2 is false.", "label": "world_1 | select count ( distinct governmentform ) from country where continent = 'Africa'" }, { "prediction": "poker_player | select people.name from people join poker_player on people.people_id = poker_player.people_id", "gold_parse": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID", "question": "Return the names of all the poker players.", "db_id": "poker_player", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "poker_player", "people" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Poker_Player_ID", "People_ID", "Final_Table_Made", "Best_Finish", "Money_Rank", "Earnings", "People_ID", "Nationality", "Name", "Birth_Date", "Height" ] }, "db_foreign_keys": { "column_id": [ 2 ], "other_column_id": [ 7 ] }, "predicted_parse_with_values": "SELECT Name FROM people", "predicted_parse_explanation": "['find the Name of people table']", "feedback": "Ensure people's people id is present in poker player table .", "context": "Return the names of all the poker players. || select name from people || poker_player | people : name, people_id | poker_player : people_id || Ensure people's people id is present in poker player table.", "label": "poker_player | select people.name from people join poker_player on people.people_id = poker_player.people_id" }, { "prediction": "dog_kennels | select first_name, last_name, email_address from owners where state like '%North%'", "gold_parse": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'", "question": "Return the first name, last name and email of the owners living in a state whose name contains the substring 'North'.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT first_name , last_name , email_address FROM Owners WHERE first_name LIKE \"North\"", "predicted_parse_explanation": "['find the first_name, last_name, email_address of Owners table for which first_name contains North']", "feedback": "first name is wrong . Use state in place of it .", "context": "Return the first name, last name and email of the owners living in a state whose name contains the substring 'North'. || select first_name, last_name, email_address from owners where first_name like 'North' || dog_kennels | owners : first_name, last_name, email_address, state ( \"%North%\" ) || first name is wrong. Use state in place of it.", "label": "dog_kennels | select first_name, last_name, email_address from owners where state like '%North%'" }, { "prediction": "world_1 | select language from countrylanguage group by countrycode order by count ( * ) desc limit 1", "gold_parse": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1", "question": "Give the language that is spoken in the most countries.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country GROUP BY Continent ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Continent in country table', 'Step 2: find Name of country table with largest value in the results of step 1']", "feedback": "Determine the largest value of language in countrylanguage table.", "context": "Give the language that is spoken in the most countries. || select name from country group by continent order by count ( * ) desc limit 1 || world_1 | countrylanguage : language, countrycode || Determine the largest value of language in countrylanguage table.", "label": "world_1 | select language from countrylanguage group by language order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select avg ( lifeexpectancy ) from country where governmentform = 'Republic' and continent = 'Africa'", "gold_parse": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", "question": "Give the average life expectancy for countries in Africa which are republics?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( GNPOld ) FROM country WHERE Continent = \"Africa\"", "predicted_parse_explanation": "['find the average GNPOld in country table whose Continent equals Africa']", "feedback": "Change gnp old with life expectancy and ensure that government form equals Republic .", "context": "Give the average life expectancy for countries in Africa which are republics? || select avg ( gnpold ) from country where continent = 'Africa' || world_1 | country : lifeexpectancy, governmentform ( \"Republic\" ), continent ( \"Africa\" ) || Change gnp old with life expectancy and ensure that government form equals Republic.", "label": "world_1 | select avg ( lifeexpectancy ) from country where continent = 'Africa' and governmentform = 'Republic'" }, { "prediction": "car_1 | select model_list.model from model_list join car_names on model_list.modelid = car_names.model join model_list on car_names.makeid = model_list.modelid group by model_list.model order by count ( * ) desc limit 1", "gold_parse": "SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1", "question": "Which model has the most version(make) of cars?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T3.Edispl FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id GROUP BY T1.Model ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find the number of rows of each value of model_list's Model in the results of step 1\", 'Step 3: find Edispl of the results of step 1 with largest value in the results of step 2']", "feedback": "Need to find car names's model for largest count of make .", "context": "Which model has the most version(make) of cars? || select cars_data.edispl from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id group by model_list.model order by count ( * ) desc limit 1 || car_1 | model_list : model, modelid | car_names : model, makeid || Need to find car names's model for largest count of make.", "label": "car_1 | select model from car_names group by model order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select countrycode from countrylanguage where language = 'English' or language = 'Dutch' isofficial", "gold_parse": "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND IsOfficial = \"T\" UNION SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\" AND IsOfficial = \"T\"", "question": "Which countries have either English or Dutch as an official language?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE LocalName = \"T\" OR LocalName = \"Dutch\"", "predicted_parse_explanation": "['find Continent of country table whose LocalName equals Dutch or LocalName equals T']", "feedback": "verify that t is the is official and the language is either english or dutch. also you should use name in place of continent.", "context": "Which countries have either English or Dutch as an official language? || select continent from country where localname = 'T' or localname = 'Dutch' || world_1 | countrylanguage : countrycode, language ( \"Dutch\" ), isofficial || verify that t is the is official and the language is either english or dutch. also you should use name in place of continent.", "label": "world_1 | select * from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and isofficial = 'T' union select * from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' and isofficial = 'T'" }, { "prediction": "world_1 | select name from country order by population desc limit 3", "gold_parse": "SELECT Name FROM country ORDER BY Population DESC LIMIT 3", "question": "Return the names of the 3 most populated countries.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM city ORDER BY Population Desc LIMIT 3", "predicted_parse_explanation": "['Step 1: find the Name of city table ordered descending by Population', 'Step 2: only show the first 3 rows of the results']", "feedback": "Replace city with country in step 1.", "context": "Return the names of the 3 most populated countries. || select name from city order by population desc limit 3 || world_1 | country : name, population || Replace city with country in step 1.", "label": "world_1 | select name from country order by population desc limit 3" }, { "prediction": "dog_kennels | select charge_type, charge_amount from charges group by charge_type", "gold_parse": "SELECT charge_type , charge_amount FROM Charges", "question": "How much does each charge type costs? List both charge type and amount.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.treatment_type_code , Sum ( T1.charge_amount ) FROM Charges AS T1 JOIN Treatments AS T2 GROUP BY T2.treatment_type_code", "predicted_parse_explanation": "['Step 1: For each row in Charges table, find the corresponding rows in Treatments table', 'Step 2: find each value of treatment_type_code in the results of step 1 along with the summation of charge_amount of the corresponding rows to each value']", "feedback": "Search each charge type in charges table along with the corresponding summation of charge amount .", "context": "How much does each charge type costs? List both charge type and amount. || select treatments.treatment_type_code, sum ( charges.charge_amount ) from charges join treatments group by treatments.treatment_type_code || dog_kennels | charges : charge_type, charge_amount || Search each charge type in charges table along with the corresponding summation of charge amount.", "label": "dog_kennels | select charge_type, charge_amount from charges" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs", "gold_parse": "SELECT count(*) FROM Paragraphs", "question": "Count the number of paragraphs.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "Do not use the reference template type's table but use paragraph's table instead.", "context": "Count the number of paragraphs. || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | paragraphs : || Do not use the reference template type's table but use paragraph's table instead.", "label": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs" }, { "prediction": "wta_1 | select winner_name from matches where year = 2013 intersect select winner_name from matches where year = 2016", "gold_parse": "SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016", "question": "List the names of all winners who played in both 2013 and 2016.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT loser_name FROM matches WHERE year = 2013 INTERSECT SELECT loser_name FROM matches WHERE year = 2016", "predicted_parse_explanation": "['Step 1: find the loser_name of matches table for which year equals 2013', 'Step 2: find the loser_name of matches table for which year equals 2016', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "In steps 1 and 2, you should replace loser's name with winner's name.", "context": "List the names of all winners who played in both 2013 and 2016. || select loser_name from matches where year = 2013 intersect select loser_name from matches where year = 2016 || wta_1 | matches : winner_name, year ( 2016 ) || In steps 1 and 2, you should replace loser's name with winner's name.", "label": "wta_1 | select winner_name from matches where year = 2013 intersect select winner_name from matches where year = 2016" }, { "prediction": "car_1 | select year from cars_data where weight < 3000 and weight > 4000", "gold_parse": "SELECT DISTINCT T1.Year FROM CARS_DATA AS T1 WHERE T1.Weight > 3000 AND T1.weight < 4000", "question": "In which years cars were produced weighing no less than 3000 and no more than 4000?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Year FROM cars_data WHERE Weight > 4000 EXCEPT SELECT Year FROM cars_data WHERE Weight < 3000", "predicted_parse_explanation": "['Step 1: find the Year of cars_data table for which Weight greater than 4000', 'Step 2: find the Year of cars_data table for which Weight less than 3000', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "Exchange 4000 with 3000 in step 1 and 3000 with 4000 in step 2 , remove \"not\" from step3.", "context": "In which years cars were produced weighing no less than 3000 and no more than 4000? || select year from cars_data where weight > 4000 except select year from cars_data where weight < 3000 || car_1 | cars_data : year, weight ( 4000, 3000 ) || Exchange 4000 with 3000 in step 1 and 3000 with 4000 in step 2, remove \"not\" from step3.", "label": "car_1 | select distinct cars_data.year from cars_data where cars_data.weight > 3000 and cars_data.weight < 4000" }, { "prediction": "tvshow | select package_option from tv_channel where id not in ( select id from cartoon where directed_by = 'Ben Jones' )", "gold_parse": "SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')", "question": "find the package option of the tv channel that do not have any cartoon directed by Ben Jones.", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Package_Option FROM TV_Channel AS T1 EXCEPT SELECT T1.Package_Option FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: find the Package_Option of TV_Channel table', 'Step 2: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 3: find Package_Option of the results of step 2 whose Written_by equals Ben Jones', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "Change written by with directed by in step 3.", "context": "find the package option of the tv channel that do not have any cartoon directed by Ben Jones. || select tv_channel.package_option from tv_channel except select tv_channel.package_option from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Ben Jones' || tvshow | tv_channel : package_option, id | cartoon : id, directed_by ( \"Ben Jones\" ) || Change written by with directed by in step 3.", "label": "tvshow | select package_option from tv_channel where id not in ( select channel from cartoon where directed_by = 'Ben Jones' )" }, { "prediction": "voter_1 | select contestants.contestant_number, contestants.contestant_name from contestants join votes on contestants.contestant_number = votes.contestant_number group by contestants.contestant_number having count ( * ) >= 2", "gold_parse": "SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING count(*) >= 2", "question": "What are the contestant numbers and names of the contestants who had at least two votes?", "db_id": "voter_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "AREA_CODE_STATE", "CONTESTANTS", "VOTES" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "area_code", "state", "contestant_number", "contestant_name", "vote_id", "phone_number", "state", "contestant_number", "created" ] }, "db_foreign_keys": { "column_id": [ 8, 7 ], "other_column_id": [ 3, 2 ] }, "predicted_parse_with_values": "SELECT contestant_number , contestant_name FROM CONTESTANTS GROUP BY contestant_name HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of contestant_name in CONTESTANTS table', 'Step 2: find contestant_number, contestant_name in CONTESTANTS table whose corresponding value in step 1 is greater than or equals 2']", "feedback": "In step 1, you should use the contestant's number from the votes table in place of contestant's name.", "context": "What are the contestant numbers and names of the contestants who had at least two votes? || select contestant_number, contestant_name from contestants group by contestant_name having count ( * ) > = 2 || voter_1 | contestants : contestant_number, contestant_name | votes : contestant_number || In step 1, you should use the contestant's number from the votes table in place of contestant's name.", "label": "voter_1 | select contestants.contestant_number, contestants.contestant_name from contestants join votes on contestants.contestant_number = votes.contestant_number group by contestants.contestant_number having count ( * ) >= 2" }, { "prediction": "employee_hire_evaluation | select name from employee where employee_id not in ( select employee_id from evaluation )", "gold_parse": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)", "question": "What are the names of the employees who never received any evaluation?", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT Name FROM employee EXCEPT SELECT Name FROM employee", "predicted_parse_explanation": "['Step 1: find the Name of employee table', 'Step 2: find the Name of employee table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "In step 2,you need to be sure employee is the part of evaluation.", "context": "What are the names of the employees who never received any evaluation? || select name from employee except select name from employee || employee_hire_evaluation | employee : name, employee_id | evaluation : employee_id || In step 2,you need to be sure employee is the part of evaluation.", "label": "employee_hire_evaluation | select name from employee where employee_id not in ( select employee_id from evaluation )" }, { "prediction": "pets_1 | select count ( * ) from pets join has_pet on pets.petid = has_pet.stuid join student on has_pet.petid = student.stuid where student.sex = 'F'", "gold_parse": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'", "question": "Find the number of dog pets that are raised by female students (with sex F).", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Pets WHERE PetType = \"dog\" AND PetType = \"F\"", "predicted_parse_explanation": "['find the number of rows in Pets table whose PetType equals F and PetType equals dog']", "feedback": "Find number of rows in has pet table whose pet type equals dog and sex equals F .", "context": "Find the number of dog pets that are raised by female students (with sex F). || select count ( * ) from pets where pettype = 'dog' and pettype = 'F' || pets_1 | pets : pettype ( \"dog\" ), petid | has_pet : stuid, petid | student : stuid, sex ( \"F\" ) || Find number of rows in has pet table whose pet type equals dog and sex equals F.", "label": "pets_1 | select count ( * ) from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where student.sex = 'F' and pets.pettype = 'dog'" }, { "prediction": "car_1 | select year from cars_data where weight < 3000 and weight > 4000", "gold_parse": "SELECT DISTINCT T1.Year FROM CARS_DATA AS T1 WHERE T1.Weight > 3000 AND T1.weight < 4000", "question": "In which years cars were produced weighing no less than 3000 and no more than 4000?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Year FROM cars_data WHERE Weight > 4000 EXCEPT SELECT Year FROM cars_data WHERE Weight < 3000", "predicted_parse_explanation": "['Step 1: find the Year of cars_data table for which Weight greater than 4000', 'Step 2: find the Year of cars_data table for which Weight less than 3000', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "In step 1, interchange 4000 with 3000 and do vice a versa in step 2, also delete not from 3rd step.", "context": "In which years cars were produced weighing no less than 3000 and no more than 4000? || select year from cars_data where weight > 4000 except select year from cars_data where weight < 3000 || car_1 | cars_data : year, weight ( 4000, 3000 ) || In step 1, interchange 4000 with 3000 and do vice a versa in step 2, also delete not from 3rd step.", "label": "car_1 | select distinct cars_data.year from cars_data where cars_data.weight > 3000 and cars_data.weight < 4000" }, { "prediction": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join country on country.code = country.countrycode where countrylanguage.language = 'French' and countrylanguage.isofficial = ( select official from country where language = 'English' )", "gold_parse": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\" AND T2.IsOfficial = \"T\"", "question": "What are the names of nations where both English and French are official languages?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE Code2 = \"T\" INTERSECT SELECT Continent FROM country WHERE Code2 = \"French\"", "predicted_parse_explanation": "['Step 1: find the Continent of country table for which Code2 equals T', 'Step 2: find the Continent of country table for which Code2 equals French', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "you have to use name, language and english in place of continent, code 2 and t respectively.t should be the is official in both steps.", "context": "What are the names of nations where both English and French are official languages? || select continent from country where code2 = 'T' intersect select continent from country where code2 = 'French' || world_1 | country : name, code | countrylanguage : countrycode, language ( \"French\" ), isofficial || you have to use name, language and english in place of continent, code 2 and t respectively.t should be the is official in both steps.", "label": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' and countrylanguage.isofficial = 'T'" }, { "prediction": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.airportcode group by airports.airportcode order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1", "question": "What is the airport code of the airport with the most flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT DestAirport FROM flights GROUP BY DestAirport ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of DestAirport in flights table', 'Step 2: find DestAirport of flights table with largest value in the results of step 1']", "feedback": "Use source airport instead of destination airport in step 1 , Exchange destination airport , flights table with airport code , airports table in step 2.", "context": "What is the airport code of the airport with the most flights? || select destairport from flights group by destairport order by count ( * ) desc limit 1 || flight_2 | airports : airportcode | flights : airportcode || Use source airport instead of destination airport in step 1, Exchange destination airport, flights table with airport code, airports table in step 2.", "label": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) desc limit 1" }, { "prediction": "wta_1 | select winner_name, winner_rank from matches where tourney_name = 'Australian Open' order by winner_rank_points desc limit 1", "gold_parse": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1", "question": "Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT winner_name , loser_rank FROM matches ORDER BY winner_rank_points Desc LIMIT 1", "predicted_parse_explanation": "['find the winner_name, loser_rank of matches table with largest value of winner_rank_points']", "feedback": "Find winner name whose tourney name equals Australian Open with largest value of winner rank points .", "context": "Find the name of the winner who has the highest rank points and participated in the Australian Open tourney. || select winner_name, loser_rank from matches order by winner_rank_points desc limit 1 || wta_1 | matches : winner_name, winner_rank, tourney_name ( \"Australian Open\" ), winner_rank_points || Find winner name whose tourney name equals Australian Open with largest value of winner rank points.", "label": "wta_1 | select winner_name from matches where tourney_name = 'Australian Open' order by winner_rank_points desc limit 1" }, { "prediction": "world_1 | select continent from country join countrylanguage on country.continent = countrylanguage.language group by continent.continent order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1", "question": "Which continent speaks the most languages?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country GROUP BY Continent ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Continent in country table', 'Step 2: find Continent of country table with largest value in the results of step 1']", "feedback": "find continent where people speaks largest number of languages .", "context": "Which continent speaks the most languages? || select continent from country group by continent order by count ( * ) desc limit 1 || world_1 | country : continent | countrylanguage : language || find continent where people speaks largest number of languages.", "label": "world_1 | select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode group by country.continent order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select country with surfacearea > ( select min ( surfacearea ) from country where continent = 'Europe' )", "gold_parse": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")", "question": "What are the countries that have greater surface area than any country in Europe?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE SurfaceArea > ( SELECT Max ( SurfaceArea ) FROM country WHERE Region = \"Europe\" )", "predicted_parse_explanation": "['Step 1: find the maximum SurfaceArea in country table whose Region equals Europe', 'Step 2: find the Continent of country table whose SurfaceArea greater than the results of step 1']", "feedback": "In step 1 exchange region with continent , In step 2 exchange continent with name name .", "context": "What are the countries that have greater surface area than any country in Europe? || select continent from country where surfacearea > ( select max ( surfacearea ) from country where region = 'Europe' ) || world_1 | country : surfacearea, continent ( \"Europe\" ) || In step 1 exchange region with continent, In step 2 exchange continent with name name.", "label": "world_1 | select name from country where surfacearea > ( select min ( surfacearea ) from country where continent = 'Europe' )" }, { "prediction": "pets_1 | select distinct student.fname, student.age from student join has_pet on student.stuid = has_pet.stuid", "gold_parse": "SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid", "question": "What are the different first names and ages of the students who do have pets?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT DISTINCT T1.Fname , T1.Age FROM Student AS T1 WHERE T1.StuID NOT IN ( SELECT T2.StuID FROM Has_Pet AS T2 )", "predicted_parse_explanation": "['Step 1: find the StuID of Has_Pet table', \"Step 2: find without repetition the Fname, Age of Student table whose Student's StuID not one of the results of step 1\"]", "feedback": "In step 1 , It must have one results.", "context": "What are the different first names and ages of the students who do have pets? || select distinct student.fname, student.age from student where student.stuid not in ( select has_pet.stuid from has_pet ) || pets_1 | student : fname, age, stuid | has_pet : stuid || In step 1, It must have one results.", "label": "pets_1 | select distinct student.fname, student.age from student join has_pet on student.stuid = has_pet.stuid" }, { "prediction": "student_transcripts_tracking | select students.first_name, students.middle_name, students.last_name, student_enrolment.student_id from student_enrolment join students on student_enrolment.student_id = students.student_id where student_enrolment.degree_program_id = ( select degree_program_id from student_enrolment group by student_enrolment.degree_program_id having count ( * ) = 2", "gold_parse": "SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2", "question": "What are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T2.student_id HAVING Count ( * ) = 2", "predicted_parse_explanation": "['Step 1: For each row in Students table, find the corresponding rows in Student_Enrolment table', \"Step 2: find the number of rows of each value of Student_Enrolment's student_id in the results of step 1\", 'Step 3: find first_name, middle_name, last_name in the results of step 1 whose corresponding value in step 2 is equals 2']", "feedback": "Ensure that semester are identical and also look for the output of student id.", "context": "What are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester? || select students.first_name, students.middle_name, students.last_name from students join student_enrolment on students.student_id = student_enrolment.student_id group by student_enrolment.student_id having count ( * ) = 2 || student_transcripts_tracking | students : first_name, middle_name, last_name, student_id | student_enrolment : student_id, degree_program_id || Ensure that semester are identical and also look for the output of student id.", "label": "student_transcripts_tracking | select students.first_name, students.middle_name, students.last_name, students.student_id from students join student_enrolment on students.student_id = student_enrolment.student_id group by students.student_id having count ( * ) = 2" }, { "prediction": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.destairport group by airports.airportcode order by count ( * ) asc limit 1", "gold_parse": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) LIMIT 1", "question": "Give the code of the airport with the least flights.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT DestAirport FROM flights GROUP BY DestAirport ORDER BY Count ( * ) Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of DestAirport in flights table', 'Step 2: find DestAirport of flights table with smallest value in the results of step 1']", "feedback": "Exchange destination airport with airport code in step 1 and step 2", "context": "Give the code of the airport with the least flights. || select destairport from flights group by destairport order by count ( * ) asc limit 1 || flight_2 | airports : airportcode | flights : destairport || Exchange destination airport with airport code in step 1 and step 2", "label": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) asc limit 1" }, { "prediction": "wta_1 | select count ( distinct winner_entry ) from matches where tourney_name = 'WTA Championships' and winner_hand = 'left'", "gold_parse": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'", "question": "How many different winners both participated in the WTA Championships and were left handed?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM players AS T1 INTERSECT SELECT T2.loser_ioc FROM matches AS T2", "predicted_parse_explanation": "['Step 1: find the number of rows in players table', 'Step 2: find the loser_ioc of matches table', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "You have to look for Left hand winners of WTA Championship from the matches table.", "context": "How many different winners both participated in the WTA Championships and were left handed? || select count ( * ) from players intersect select matches.loser_ioc from matches as matches || wta_1 | matches : winner_entry, tourney_name ( \"WTA Championships\" ), winner_hand ( \"left\" ) || You have to look for Left hand winners of WTA Championship from the matches table.", "label": "wta_1 | select count ( distinct winner_name ) from matches where tourney_name = 'WTA Championships' and winner_hand = 'L'" }, { "prediction": "student_transcripts_tracking | select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id group by courses.course_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1", "question": "What's the name of the course with most number of enrollments?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name FROM Courses GROUP BY course_name ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of course_name in Courses table', 'Step 2: find course_name of Courses table with largest value in the results of step 1']", "feedback": "In step 1, I want total rows of very value of id of course in student enrolment course table.", "context": "What's the name of the course with most number of enrollments? || select course_name from courses group by course_name order by count ( * ) desc limit 1 || student_transcripts_tracking | courses : course_name, course_id | student_enrolment_courses : course_id || In step 1, I want total rows of very value of id of course in student enrolment course table.", "label": "student_transcripts_tracking | select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id group by courses.course_name order by count ( * ) desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select document_id, count ( * ) from paragraphs group by document_id order by count ( * ) asc", "gold_parse": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", "question": "Show all document ids and the number of paragraphs in each document. Order by document id.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID , Count ( * ) FROM Paragraphs GROUP BY Document_ID ORDER BY Count ( * ) Asc", "predicted_parse_explanation": "['Step 1: for each value of Document_ID in Paragraphs table, calculate number of rows', 'Step 2: show each value of Document_ID in Paragraphs table along with the corresponding number of rows ordered ascending by the results of step 1']", "feedback": "Make sure to arrange ID of document.", "context": "Show all document ids and the number of paragraphs in each document. Order by document id. || select document_id, count ( * ) from paragraphs group by document_id order by count ( * ) asc || cre_Doc_Template_Mgt | paragraphs : document_id || Make sure to arrange ID of document.", "label": "cre_Doc_Template_Mgt | select document_id, count ( * ) from paragraphs group by document_id order by document_id asc" }, { "prediction": "cre_Doc_Template_Mgt | select document_name, template_id from documents where document_description like '%w%'", "gold_parse": "SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE \"%w%\"", "question": "Return the names and template ids for documents that contain the letter w in their description.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_Name , Document_ID FROM Documents WHERE Document_Description LIKE \"w\"", "predicted_parse_explanation": "['find the Document_Name, Document_ID of Documents table for which Document_Description contains w']", "feedback": "You can use Id of template as ID of document is not correct.", "context": "Return the names and template ids for documents that contain the letter w in their description. || select document_name, document_id from documents where document_description like 'w' || cre_Doc_Template_Mgt | documents : document_name, template_id, document_description ( \"%w%\" ) || You can use Id of template as ID of document is not correct.", "label": "cre_Doc_Template_Mgt | select document_name, template_id from documents where document_description like '%w%'" }, { "prediction": "world_1 | select city.name from city join country on city.countrycode = country.code join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language!= 'english'", "gold_parse": "SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')", "question": "Which cities are in European countries where English is not the official language?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = \"T\" EXCEPT SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = \"Europe\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in city table', \"Step 2: find city's Name of the results of step 1 whose Continent equals T\", \"Step 3: find city's Name of the results of step 1 whose Continent equals Europe\", 'Step 4: show the rows that are in the results of step 2 but not in the results of step 3']", "feedback": "Add countrylanguage , Exchange continent with is official and ensure language not equals English ?( step 2) , show both step 2 , 3 as result .", "context": "Which cities are in European countries where English is not the official language? || select city.name from city join country on city.countrycode = country.code where country.continent = 'T' except select city.name from city join country on city.countrycode = country.code where country.continent = 'Europe' || world_1 | city : name, countrycode | country : code, continent ( \"Europe\" ) | countrylanguage : countrycode, language ( \"english\" ) || Add countrylanguage, Exchange continent with is official and ensure language not equals English?( step 2), show both step 2, 3 as result.", "label": "world_1 | select distinct city.name from country join city on city.countrycode = country.code where country.continent = 'Europe' and country.name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'English' )" }, { "prediction": "pets_1 | select student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where pets.pet_age = 3", "gold_parse": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'", "question": "What is the last name of the student who has a cat that is 3 years old?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT LName FROM Student WHERE Age = 3", "predicted_parse_explanation": "['find the LName of Student table for which Age equals 3']", "feedback": "Use pet age of Pet table instead of Age.", "context": "What is the last name of the student who has a cat that is 3 years old? || select lname from student where age = 3 || pets_1 | student : lname, stuid, age ( 3 ) | has_pet : stuid, petid | pets : petid, pet_age ( 3 ) || Use pet age of Pet table instead of Age.", "label": "pets_1 | select student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pet_age = 3 and pets.pettype = 'cat'" }, { "prediction": "dog_kennels | select owners.owner_id, owners.first_name, owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id group by owners.owner_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "question": "Which owner owns the most dogs? List the owner id, first name and last name.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT owner_id , first_name , last_name FROM Owners GROUP BY owner_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of owner_id in Owners table', 'Step 2: find owner_id, first_name, last_name of Owners table with largest value in the results of step 1']", "feedback": "Require dogs table in place of owners table in 1st step.", "context": "Which owner owns the most dogs? List the owner id, first name and last name. || select owner_id, first_name, last_name from owners group by owner_id order by count ( * ) desc limit 1 || dog_kennels | owners : owner_id, first_name, last_name | dogs : owner_id || Require dogs table in place of owners table in 1st step.", "label": "dog_kennels | select dogs.owner_id, owners.first_name, owners.last_name from dogs join owners on dogs.owner_id = owners.owner_id group by dogs.owner_id order by count ( * ) desc limit 1" }, { "prediction": "student_transcripts_tracking | select courses.course_name, courses.course_id from courses join sections on courses.course_id = sections.course_id group by courses.course_name having count ( * ) < 2", "gold_parse": "SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2", "question": "What are the names and ids of every course with less than 2 sections?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name , course_id FROM Courses GROUP BY course_id HAVING Count ( * ) < 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of course_id in Courses table', 'Step 2: find course_name, course_id in Courses table whose corresponding value in step 1 is less than 2']", "feedback": "In step 1, you should only use the section's table.", "context": "What are the names and ids of every course with less than 2 sections? || select course_name, course_id from courses group by course_id having count ( * ) < 2 || student_transcripts_tracking | courses : course_name, course_id | sections : course_id || In step 1, you should only use the section's table.", "label": "student_transcripts_tracking | select courses.course_name, courses.course_id from courses join sections on courses.course_id = sections.course_id group by courses.course_id having count ( * ) <= 2" }, { "prediction": "world_1 | select sum ( surfacearea ) from country where continent = 'Asia' and continent = 'Europe'", "gold_parse": "SELECT sum(SurfaceArea) FROM country WHERE Continent = \"Asia\" OR Continent = \"Europe\"", "question": "What is the total surface area of the continents Asia and Europe?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Sum ( SurfaceArea ) FROM country WHERE Continent = \"Europe\" AND Continent = \"Asia\"", "predicted_parse_explanation": "['find the summation of SurfaceArea in country table whose Continent equals Asia and Continent equals Europe']", "feedback": "should be or not and", "context": "What is the total surface area of the continents Asia and Europe? || select sum ( surfacearea ) from country where continent = 'Europe' and continent = 'Asia' || world_1 | country : surfacearea, continent ( \"Europe\" ) || should be or not and", "label": "world_1 | select sum ( surfacearea ) from country where continent = 'Asia' or continent = 'Europe'" }, { "prediction": "tvshow | select title from cartoon where directed_by = 'Ben Jones'", "gold_parse": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\"", "question": "What are the names of all cartoons directed by Ben Jones?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Title FROM Cartoon WHERE Written_by = \"Ben Jones\" AND Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['find Title of Cartoon table whose Written_by equals Ben Jones and Directed_by equals Ben Jones']", "feedback": "Remove written by equals Ben Jones and\" phrase .", "context": "What are the names of all cartoons directed by Ben Jones? || select title from cartoon where written_by = 'Ben Jones' and directed_by = 'Ben Jones' || tvshow | cartoon : title, directed_by ( \"Ben Jones\" ) || Remove written by equals Ben Jones and\" phrase.", "label": "tvshow | select title from cartoon where directed_by = 'Ben Jones'" }, { "prediction": "voter_1 | select created from votes where state = 'CA'", "gold_parse": "SELECT max(created) FROM votes WHERE state = 'CA'", "question": "What is last date created of votes from the state 'CA'?", "db_id": "voter_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "AREA_CODE_STATE", "CONTESTANTS", "VOTES" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "area_code", "state", "contestant_number", "contestant_name", "vote_id", "phone_number", "state", "contestant_number", "created" ] }, "db_foreign_keys": { "column_id": [ 8, 7 ], "other_column_id": [ 3, 2 ] }, "predicted_parse_with_values": "SELECT created FROM VOTES WHERE state = \"CA\"", "predicted_parse_explanation": "['find the created of VOTES table for which state equals CA']", "feedback": "Ensure to find largest value of created .", "context": "What is last date created of votes from the state 'CA'? || select created from votes where state = 'CA' || voter_1 | votes : created, state ( \"CA\" ) || Ensure to find largest value of created.", "label": "voter_1 | select max ( created ) from votes where state = 'CA'" }, { "prediction": "flight_2 | select count ( * ) from flights", "gold_parse": "SELECT count(*) FROM FLIGHTS", "question": "How many flights do we have?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines", "predicted_parse_explanation": "['find the number of rows in airlines table']", "feedback": "You need to utilize table of flights.", "context": "How many flights do we have? || select count ( * ) from airlines || flight_2 | flights : || You need to utilize table of flights.", "label": "flight_2 | select count ( * ) from flights" }, { "prediction": "student_transcripts_tracking | select count ( distinct transcript_id ), student_enrolment_id from transcript_contents group by transcript_id", "gold_parse": "SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1", "question": "How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , course_id FROM Student_Enrolment_Courses GROUP BY course_id", "predicted_parse_explanation": "['find each value of course_id in Student_Enrolment_Courses table along with the number of the corresponding rows to each value']", "feedback": "Verify that students are enrolled in course having distinct transcripts.", "context": "How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id. || select count ( * ), course_id from student_enrolment_courses group by course_id || student_transcripts_tracking | transcript_contents : transcript_id, student_enrolment_id || Verify that students are enrolled in course having distinct transcripts.", "label": "student_transcripts_tracking | select count ( * ), student_course_id from transcript_contents group by student_course_id order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select surfacearea from country where continent > ( select min ( surfacearea ) from country where continent = 'Europe' )", "gold_parse": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")", "question": "Which countries have greater area than that of any country in Europe?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE SurfaceArea > ( SELECT SurfaceArea FROM country WHERE Region = \"Europe\" )", "predicted_parse_explanation": "['Step 1: find the SurfaceArea of country table for which Region equals Europe', 'Step 2: find the Continent of country table whose SurfaceArea greater than the results of step 1']", "feedback": "swap between region and continent as well as between continent and name.", "context": "Which countries have greater area than that of any country in Europe? || select continent from country where surfacearea > ( select surfacearea from country where region = 'Europe' ) || world_1 | country : surfacearea, continent ( \"Europe\" ) || swap between region and continent as well as between continent and name.", "label": "world_1 | select name from country where surfacearea > ( select min ( surfacearea ) from country where continent = 'Europe' )" }, { "prediction": "dog_kennels | select owners.owner_id, owners.first_name, owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id group by owners.owner_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "question": "Which owner owns the most dogs? List the owner id, first name and last name.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT owner_id , first_name , last_name FROM Owners GROUP BY owner_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of owner_id in Owners table', 'Step 2: find owner_id, first_name, last_name of Owners table with largest value in the results of step 1']", "feedback": "In step 1 , owners table should be replaced by dogs table .", "context": "Which owner owns the most dogs? List the owner id, first name and last name. || select owner_id, first_name, last_name from owners group by owner_id order by count ( * ) desc limit 1 || dog_kennels | owners : owner_id, first_name, last_name | dogs : owner_id || In step 1, owners table should be replaced by dogs table.", "label": "dog_kennels | select dogs.owner_id, owners.first_name, owners.last_name from dogs join owners on dogs.owner_id = owners.owner_id group by dogs.owner_id order by count ( * ) desc limit 1" }, { "prediction": "car_1 | select car_makers.id, model_list.maker from car_makers join model_list on car_makers.makeid = model_list.model group by car_names.makeid having count ( * ) >= 2 intersect select car_makers.id, car_names.makeid from car_makers join model_list on car_makers.makeid = model_list.makeid group by car_names.makeid having count ( * ) >= 3", "gold_parse": "SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) >= 2 INTERSECT SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model GROUP BY T1.Id HAVING count(*) > 3", "question": "Which are the car makers which produce at least 2 models and more than 3 car makes? List the id and the maker.", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T2.MakeId , T1.ModelId FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model WHERE T1.Model > = 2 INTERSECT SELECT T2.MakeId , T1.ModelId FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model WHERE T1.Model > 3", "predicted_parse_explanation": "['Step 1: For each row in model_list table, find the corresponding rows in car_names table', \"Step 2: find MakeId, ModelId of the results of step 1 whose model_list's Model greater than or equals 2\", \"Step 3: find MakeId, ModelId of the results of step 1 whose model_list's Model greater than 3\", 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "Add car makers table , replace make id , cont id and model list's model with id , maker and car names' model respectively .", "context": "Which are the car makers which produce at least 2 models and more than 3 car makes? List the id and the maker. || select car_names.makeid, model_list.modelid from model_list join car_names on model_list.model = car_names.model where model_list.model > = 2 intersect select car_names.makeid, model_list.modelid from model_list join car_names on model_list.model = car_names.model where model_list.model > 3 || car_1 | car_makers : id, maker | model_list : maker, model | car_names : makeid || Add car makers table, replace make id, cont id and model list's model with id, maker and car names' model respectively.", "label": "car_1 | select car_makers.id, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id having count ( * ) >= 2 intersect select car_makers.id, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.model group by car_makers.id having count ( * ) > 3" }, { "prediction": "singer | select singer.name, sum ( song.sales ) from singer join song on singer.singer_id = song.singer_id group by singer.name", "gold_parse": "SELECT T1.Name , sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name", "question": "Show the names of singers and the total sales of their songs.", "db_id": "singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "singer", "song" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Singer_ID", "Name", "Birth_Year", "Net_Worth_Millions", "Citizenship", "Song_ID", "Title", "Singer_ID", "Sales", "Highest_Position" ] }, "db_foreign_keys": { "column_id": [ 8 ], "other_column_id": [ 1 ] }, "predicted_parse_with_values": "SELECT T1.Name , Sum ( T2.Sales ) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T2.Singer_ID", "predicted_parse_explanation": "['Step 1: For each row in singer table, find the corresponding rows in song table', 'Step 2: find each value of Singer_ID in the results of step 1 along with the summation of Sales of the corresponding rows to each value']", "feedback": "also show singer's name", "context": "Show the names of singers and the total sales of their songs. || select singer.name, sum ( song.sales ) from singer join song on singer.singer_id = song.singer_id group by song.singer_id || singer | singer : name, singer_id | song : sales, singer_id || also show singer's name", "label": "singer | select singer.name, sum ( song.sales ) from singer join song on singer.singer_id = song.singer_id group by singer.name" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from templates", "gold_parse": "SELECT count(*) FROM Templates", "question": "Count the number of templates.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "Substitute reference template types table with templates table.", "context": "Count the number of templates. || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | templates : || Substitute reference template types table with templates table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from templates" }, { "prediction": "student_transcripts_tracking | select line_1, line_2 from addresses", "gold_parse": "SELECT line_1 , line_2 FROM addresses", "question": "what are all the addresses including line 1 and line 2?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT line_1 FROM Addresses WHERE line_1 = \"2294 Grant Square Apt. 235\" INTERSECT SELECT line_1 FROM Addresses WHERE line_1 = \"2294 Grant Square Apt. 235\"", "predicted_parse_explanation": "['Step 1: find the line_1 of Addresses table for which line_1 equals 2294 Grant Square Apt. 235', 'Step 2: find the line_1 of Addresses table for which line_1 equals 2294 Grant Square Apt. 235', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "You need to use line 2 in step 2 and drop second part from both step.", "context": "what are all the addresses including line 1 and line 2? || select line_1 from addresses where line_1 = '2294 Grant Square Apt. 235' intersect select line_1 from addresses where line_1 = '2294 Grant Square Apt. 235' || student_transcripts_tracking | addresses : line_1, line_2 || You need to use line 2 in step 2 and drop second part from both step.", "label": "student_transcripts_tracking | select line_1, line_2 from addresses" }, { "prediction": "course_teach | select teacher.name, count ( * ) from course join teacher on course.teacher_id = teacher.teacher_id group by teacher.name", "gold_parse": "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name", "question": "What are the names of the teachers and how many courses do they teach?", "db_id": "course_teach", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "course", "teacher", "course_arrange" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2 ], "column_name": [ "*", "Course_ID", "Staring_Date", "Course", "Teacher_ID", "Name", "Age", "Hometown", "Course_ID", "Teacher_ID", "Grade" ] }, "db_foreign_keys": { "column_id": [ 9, 8 ], "other_column_id": [ 4, 1 ] }, "predicted_parse_with_values": "SELECT T1.Name , Count ( * ) FROM teacher AS T1 JOIN course_arrange AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Teacher_ID", "predicted_parse_explanation": "['Step 1: For each row in teacher table, find the corresponding rows in course_arrange table', \"Step 2: find each value of course_arrange's Teacher_ID in the results of step 1 along with the number of the corresponding rows to each value\"]", "feedback": "I want the name of teacher.", "context": "What are the names of the teachers and how many courses do they teach? || select teacher.name, count ( * ) from teacher join course_arrange on teacher.teacher_id = course_arrange.teacher_id group by course_arrange.teacher_id || course_teach | teacher : name, teacher_id | course : teacher_id || I want the name of teacher.", "label": "course_teach | select teacher.name, count ( * ) from course_arrange join teacher on course_arrange.teacher_id = teacher.teacher_id group by teacher.name" }, { "prediction": "battle_death | select distinct battle.id, battle.name from ship join battle on ship.lost_in_battle = battle.id where ship.ship_type = 'Brig'", "gold_parse": "SELECT DISTINCT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.ship_type = 'Brig'", "question": "What are the different ids and names of the battles that lost any 'Brig' type shipes?", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT DISTINCT id , name FROM ship WHERE ship_type = \"Brig\"", "predicted_parse_explanation": "['find without repetition the id, name of ship table for which ship_type equals Brig']", "feedback": "Interchange battle table for ship table.", "context": "What are the different ids and names of the battles that lost any 'Brig' type shipes? || select distinct id, name from ship where ship_type = 'Brig' || battle_death | battle : id, name | ship : lost_in_battle, ship_type ( \"Brig\" ) || Interchange battle table for ship table.", "label": "battle_death | select distinct battle.id, battle.name from battle join ship on battle.id = ship.lost_in_battle where ship.ship_type = 'Brig'" }, { "prediction": "car_1 | select countries.countryname, count ( * ) from continents join countries on continents.continent = countries.continent group by countries.countryname", "gold_parse": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent", "question": "What is the name of each continent and how many car makers are there in each one?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Continent , Count ( * ) FROM continents GROUP BY Continent", "predicted_parse_explanation": "['find each value of Continent in continents table along with the number of the corresponding rows to each value']", "feedback": "in car makers table use all the number of rows which is corresponds to continent.", "context": "What is the name of each continent and how many car makers are there in each one? || select continent, count ( * ) from continents group by continent || car_1 | countries : countryname, continent | continents : continent || in car makers table use all the number of rows which is corresponds to continent.", "label": "car_1 | select continents.continent, count ( * ) from continents join countries on continents.contid = countries.continent join car_makers on countries.countryid = car_makers.country group by continents.continent" }, { "prediction": "cre_Doc_Template_Mgt | select count ( distinct paragraphs.paragraph_id ) from documents join paragraphs on documents.document_id = paragraphs.document_id where documents.document_name = 'Summer Show'", "gold_parse": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", "question": "Count the number of paragraphs in the document named 'Summer Show'.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Documents WHERE Document_Name LIKE \"Summer Show\"", "predicted_parse_explanation": "['find the number of rows in Documents table whose Document_Name contains Summer Show']", "feedback": "Find number of paragraphs table whose Document ID's corresponding Documents's document name contains Summer Show .", "context": "Count the number of paragraphs in the document named 'Summer Show'. || select count ( * ) from documents where document_name like 'Summer Show' || cre_Doc_Template_Mgt | paragraphs : paragraph_id, document_id | documents : document_id, document_name ( \"Summer Show\" ) || Find number of paragraphs table whose Document ID's corresponding Documents's document name contains Summer Show.", "label": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Summer Show'" }, { "prediction": "world_1 | select city.name from city join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'english' order by city.population desc limit 1", "gold_parse": "SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = \"English\" ORDER BY T1.Population DESC LIMIT 1", "question": "Find the city with the largest population that uses English.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Name = \"English\" ORDER BY T1.Population Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in city table', \"Step 2: find the city's Name in the results of step 1 whose country's Name equals English ordered descending by city's Population\", 'Step 3: only show the first row of the results']", "feedback": "In step 1 correspond with countrylanguage too . In step 2 Switch country's name with countrylanguage's language .", "context": "Find the city with the largest population that uses English. || select city.name from city join country on city.countrycode = country.code where country.name = 'English' order by city.population desc limit 1 || world_1 | city : name, countrycode, population | countrylanguage : countrycode, language ( \"english\" ) || In step 1 correspond with countrylanguage too. In step 2 Switch country's name with countrylanguage's language.", "label": "world_1 | select city.name, city.population from city join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'English' order by city.population desc limit 1" }, { "prediction": "network_1 | select student_id from student except select student_id from friend", "gold_parse": "SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend", "question": "Show ids of all students who do not have any friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.ID FROM Highschooler AS T1 EXCEPT SELECT T2.liked_id FROM Likes AS T2", "predicted_parse_explanation": "['Step 1: find the ID of Highschooler table', 'Step 2: find the liked_id of Likes table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "I want the id of student from friend table in step 2.", "context": "Show ids of all students who do not have any friends. || select highschooler.id from highschooler except select likes.liked_id from likes as likes || network_1 | student : student_id | friend : student_id || I want the id of student from friend table in step 2.", "label": "network_1 | select id from highschooler except select student_id from friend" }, { "prediction": "world_1 | select country.region from city join country on city.district = country.code where city.name = 'Kabul'", "gold_parse": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", "question": "Which region is the city Kabul located in?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT LocalName FROM country WHERE Region = \"Kabul\"", "predicted_parse_explanation": "['find the LocalName of country table for which Region equals Kabul']", "feedback": "Exchange local name with region and region with city's name name .", "context": "Which region is the city Kabul located in? || select localname from country where region = 'Kabul' || world_1 | country : region, code | city : district, name ( \"Kabul\" ) || Exchange local name with region and region with city's name name.", "label": "world_1 | select region from country join city on country.code = city.countrycode where city.name = 'Kabul'" }, { "prediction": "voter_1 | select area_code_state.area_code from area_code_state join votes on area_code_state.area_code = votes.area_code group by votes.area_code order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code ORDER BY count(*) DESC LIMIT 1", "question": "What is the area code in which the most voters voted?", "db_id": "voter_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "AREA_CODE_STATE", "CONTESTANTS", "VOTES" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "area_code", "state", "contestant_number", "contestant_name", "vote_id", "phone_number", "state", "contestant_number", "created" ] }, "db_foreign_keys": { "column_id": [ 8, 7 ], "other_column_id": [ 3, 2 ] }, "predicted_parse_with_values": "SELECT area_code FROM AREA_CODE_STATE GROUP BY state ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of state in AREA_CODE_STATE table', 'Step 2: find area_code of AREA_CODE_STATE table with largest value in the results of step 1']", "feedback": "Replace area code state table with votes table in step 1.", "context": "What is the area code in which the most voters voted? || select area_code from area_code_state group by state order by count ( * ) desc limit 1 || voter_1 | area_code_state : area_code | votes : area_code || Replace area code state table with votes table in step 1.", "label": "voter_1 | select area_code_state.area_code from area_code_state join votes on area_code_state.state = votes.state group by area_code_state.area_code order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select name from country where continent = 'Asia' and population > ( select max ( population ) from country where continent = 'Africa' )", "gold_parse": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT max(population) FROM country WHERE Continent = \"Africa\")", "question": "Which Asian countries have a population that is larger than any country in Africa?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country WHERE Continent = \"Asia\" AND Population > 103000", "predicted_parse_explanation": "['find Name of country table whose Continent equals Asia and Population greater than 103000']", "feedback": "population should be greater than population of countries of continent equals Africa instead of 103000.", "context": "Which Asian countries have a population that is larger than any country in Africa? || select name from country where continent = 'Asia' and population > 103000 || world_1 | country : name, continent ( \"Africa\" ), population || population should be greater than population of countries of continent equals Africa instead of 103000.", "label": "world_1 | select name from country where continent = 'Asia' and population > ( select max ( population ) from country where continent = 'Africa' )" }, { "prediction": "student_transcripts_tracking | select line_1, line_2 from addresses", "gold_parse": "SELECT line_1 , line_2 FROM addresses", "question": "What is the first and second line for all addresses?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T2.first_name , T1.line_1 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id", "predicted_parse_explanation": "['Step 1: For each row in Addresses table, find the corresponding rows in Students table', 'Step 2: find first_name, line_1 of the results of step 1']", "feedback": "Use line 2 in place of first name in step 2. ", "context": "What is the first and second line for all addresses? || select students.first_name, addresses.line_1 from addresses join students on addresses.address_id = students.current_address_id || student_transcripts_tracking | addresses : line_1, line_2 || Use line 2 in place of first name in step 2.", "label": "student_transcripts_tracking | select line_1, line_2 from addresses" }, { "prediction": "student_transcripts_tracking | select count ( * ) from transcripts", "gold_parse": "SELECT count(*) FROM Transcripts", "question": "How many transcripts are released?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Addresses", "predicted_parse_explanation": "['find the number of rows in Addresses table']", "feedback": "Put transcripts table in place of addresses table .", "context": "How many transcripts are released? || select count ( * ) from addresses || student_transcripts_tracking | transcripts : || Put transcripts table in place of addresses table.", "label": "student_transcripts_tracking | select count ( * ) from transcripts" }, { "prediction": "network_1 | select highschooler.name, count ( * ) from highschooler join friend on highschooler.id = friend.student_id group by highschooler.id", "gold_parse": "SELECT T2.name , count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "question": "Show the names of high school students and their corresponding number of friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.name , T1.grade , Count ( * ) FROM Highschooler AS T1 JOIN Friend AS T2 ON T1.ID = T2.student_id GROUP BY T2.student_id", "predicted_parse_explanation": "['Step 1: For each row in Highschooler table, find the corresponding rows in Friend table', 'Step 2: for each value of student_id in the results of step 1, find the number of rows along with name and grade']", "feedback": "No need to find grade in step 2.", "context": "Show the names of high school students and their corresponding number of friends. || select highschooler.name, highschooler.grade, count ( * ) from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id || network_1 | highschooler : name, id | friend : student_id || No need to find grade in step 2.", "label": "network_1 | select highschooler.name, count ( * ) from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id" }, { "prediction": "cre_Doc_Template_Mgt | select paragraphs.paragraph_id, paragraphs.paragraph_text from documents join paragraphs on documents.document_id = paragraphs.document_id where documents.document_name = 'Welcome to NY'", "gold_parse": "SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'", "question": "Show all paragraph ids and texts for the document with name 'Welcome to NY'.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID , Template_ID FROM Documents WHERE Document_Name = \"Welcome to NY\"", "predicted_parse_explanation": "['find the Document_ID, Template_ID of Documents table for which Document_Name equals Welcome to NY']", "feedback": "Replace document id , template id and documents table with paragraph id , paragraph text and paragraphs table .", "context": "Show all paragraph ids and texts for the document with name 'Welcome to NY'. || select document_id, template_id from documents where document_name = 'Welcome to NY' || cre_Doc_Template_Mgt | paragraphs : paragraph_id, paragraph_text, document_id | documents : document_id, document_name ( \"Welcome to NY\" ) || Replace document id, template id and documents table with paragraph id, paragraph text and paragraphs table.", "label": "cre_Doc_Template_Mgt | select paragraphs.paragraph_id, paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Welcome to NY'" }, { "prediction": "dog_kennels | select first_name, last_name, email_address from owners where state like '%North%'", "gold_parse": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'", "question": "Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT first_name , last_name , email_address FROM Owners WHERE first_name LIKE \"North\"", "predicted_parse_explanation": "['find the first_name, last_name, email_address of Owners table for which first_name contains North']", "feedback": "You should use the phrase \"state contains North\".", "context": "Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email. || select first_name, last_name, email_address from owners where first_name like 'North' || dog_kennels | owners : first_name, last_name, email_address, state ( \"%North%\" ) || You should use the phrase \"state contains North\".", "label": "dog_kennels | select first_name, last_name, email_address from owners where state like '%North%'" }, { "prediction": "student_transcripts_tracking | select section_name from sections order by section_name desc", "gold_parse": "SELECT section_name FROM Sections ORDER BY section_name DESC", "question": "List the section_name in reversed lexicographical order.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT section_name FROM Sections ORDER BY section_name Asc", "predicted_parse_explanation": "['find the section_name of Sections table ordered ascending by section_name']", "feedback": "You have to arrange in descending order.", "context": "List the section_name in reversed lexicographical order. || select section_name from sections order by section_name asc || student_transcripts_tracking | sections : section_name || You have to arrange in descending order.", "label": "student_transcripts_tracking | select section_name from sections order by section_name desc" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id having count ( * ) >= 3", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 3", "question": "Show the names of high schoolers who have at least 3 friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler GROUP BY grade HAVING Count ( * ) > = 3", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of grade in Highschooler table', 'Step 2: find name in Highschooler table whose corresponding value in step 1 is greater than or equals 3']", "feedback": "From step 1, I want student id of friend table.", "context": "Show the names of high schoolers who have at least 3 friends. || select name from highschooler group by grade having count ( * ) > = 3 || network_1 | highschooler : name, id | friend : student_id || From step 1, I want student id of friend table.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id having count ( * ) >= 3" }, { "prediction": "student_transcripts_tracking | select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id", "gold_parse": "SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id", "question": "What are all the course names of the courses which ever have students enrolled in?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name FROM Courses", "predicted_parse_explanation": "['find the course_name of Courses table']", "feedback": "Ensure Courses' course id is present in student enrolment courses table .", "context": "What are all the course names of the courses which ever have students enrolled in? || select course_name from courses || student_transcripts_tracking | courses : course_name, course_id | student_enrolment_courses : course_id || Ensure Courses' course id is present in student enrolment courses table.", "label": "student_transcripts_tracking | select distinct courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id" }, { "prediction": "wta_1 | select loser_rank from matches order by loser_rank desc limit 1", "gold_parse": "SELECT min(loser_rank) FROM matches", "question": "Find the highest rank of losers in all matches.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT loser_rank FROM matches", "predicted_parse_explanation": "['find the loser_rank of matches table']", "feedback": "Look for the rank of greatest loser.", "context": "Find the highest rank of losers in all matches. || select loser_rank from matches || wta_1 | matches : loser_rank || Look for the rank of greatest loser.", "label": "wta_1 | select min ( loser_rank ) from matches" }, { "prediction": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French'", "gold_parse": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"", "question": "Give the names of nations that speak both English and French.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in countrylanguage table', 'Step 2: find Continent of the results of step 1 whose Language equals English', 'Step 3: find Continent of the results of step 1 whose Language equals French', 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "Take name name in place of continent in step 2 and 3.", "context": "Give the names of nations that speak both English and French. || select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' || world_1 | country : name, code | countrylanguage : countrycode, language ( \"French\" ) || Take name name in place of continent in step 2 and 3.", "label": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French'" }, { "prediction": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Asia' group by countrylanguage.language order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1", "question": "What is the language that is used by the largest number of Asian nations?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country WHERE Continent = \"Asia\" ORDER BY Population Desc LIMIT 1", "predicted_parse_explanation": "['find the Name of country table for which Continent equals Asia with largest value of Population']", "feedback": "Find countrylanguage's language which are used most number of times for continent equals Asia .", "context": "What is the language that is used by the largest number of Asian nations? || select name from country where continent = 'Asia' order by population desc limit 1 || world_1 | countrylanguage : language, countrycode | country : code, continent ( \"Asia\" ) || Find countrylanguage's language which are used most number of times for continent equals Asia.", "label": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Asia' group by countrylanguage.language order by count ( * ) desc limit 1" }, { "prediction": "dog_kennels | select dogs.date_arrived, dogs.date_departed from treatments join dogs on treatments.dog_id = dogs.dog_id", "gold_parse": "SELECT DISTINCT T1.date_arrived , T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id", "question": "Find the arriving date and the departing date of the dogs that received a treatment.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT date_departed , date_of_birth FROM Dogs WHERE gender = 1", "predicted_parse_explanation": "['find the date_departed, date_of_birth of Dogs table for which gender equals 1']", "feedback": "Find date departed , date arrived of dogs table which Dogs's dog id present in Treatments's dog id .", "context": "Find the arriving date and the departing date of the dogs that received a treatment. || select date_departed, date_of_birth from dogs where gender = 1 || dog_kennels | dogs : date_arrived, date_departed, dog_id | treatments : dog_id || Find date departed, date arrived of dogs table which Dogs's dog id present in Treatments's dog id.", "label": "dog_kennels | select distinct dogs.date_arrived, dogs.date_departed from dogs join treatments on dogs.dog_id = treatments.dog_id" }, { "prediction": "dog_kennels | select treatments.date_of_treatment, professionals.first_name from treatments join professionals on treatments.professional_id = professionals.professional_id", "gold_parse": "SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id", "question": "List the date of each treatment, together with the first name of the professional who operated it.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T1.date_adopted , T2.first_name FROM Dogs AS T1 JOIN Professionals AS T2 JOIN Treatments AS T3 ON T1.dog_id = T3.dog_id AND T3.professional_id = T2.professional_id", "predicted_parse_explanation": "['Step 1: For each row in Treatments table, find corresponding rows in Dogs table and in Professionals table', 'Step 2: find date_adopted, first_name of the results of step 1']", "feedback": "Supersede date adopted with date of treatment in step 2.", "context": "List the date of each treatment, together with the first name of the professional who operated it. || select dogs.date_adopted, professionals.first_name from dogs join professionals join treatments on dogs.dog_id = treatments.dog_id and treatments.professional_id = professionals.professional_id || dog_kennels | treatments : date_of_treatment, professional_id | professionals : first_name, professional_id || Supersede date adopted with date of treatment in step 2.", "label": "dog_kennels | select treatments.date_of_treatment, professionals.first_name from treatments join professionals on treatments.professional_id = professionals.professional_id" }, { "prediction": "wta_1 | select winner_name, winner_rank_points from matches group by winner_name order by count ( * ) desc limit 1", "gold_parse": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the winner who has won the most matches, and how many rank points does this player have?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT winner_name , loser_rank FROM matches GROUP BY winner_name ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of winner_name in matches table', 'Step 2: find winner_name, loser_rank of matches table with largest value in the results of step 1']", "feedback": "In step 2, you have to use sum of winner rank points.", "context": "What is the name of the winner who has won the most matches, and how many rank points does this player have? || select winner_name, loser_rank from matches group by winner_name order by count ( * ) desc limit 1 || wta_1 | matches : winner_name, winner_rank_points || In step 2, you have to use sum of winner rank points.", "label": "wta_1 | select winner_name, winner_rank_points from matches group by winner_name order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select sum ( population ) from country where countrycode not in ( select countrycode from countrylanguage where language = 'english' )", "gold_parse": "SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\")", "question": "What is the total number of people living in the nations that do not use English?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Sum ( Population ) FROM country WHERE Continent ! = \"English\"", "predicted_parse_explanation": "['find the summation of Population in country table whose Continent not equals English']", "feedback": "I want the language from countrylanguage table in place of Continent because it is not correct.", "context": "What is the total number of people living in the nations that do not use English? || select sum ( population ) from country where continent! = 'English' || world_1 | country : population, code | countrylanguage : countrycode, language ( \"english\" ) || I want the language from countrylanguage table in place of Continent because it is not correct.", "label": "world_1 | select sum ( population ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' )" }, { "prediction": "flight_2 | select count ( * ) from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "question": "How many flights arriving in Aberdeen city?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE City = \"Aberdeen\"", "predicted_parse_explanation": "['find the number of rows in airports table whose City equals Aberdeen']", "feedback": "exchange airports table with flights and ensure that destination airport code corresponds to city equals Aberdeen .", "context": "How many flights arriving in Aberdeen city? || select count ( * ) from airports where city = 'Aberdeen' || flight_2 | flights : sourceairport | airports : airportcode, city ( \"Aberdeen\" ) || exchange airports table with flights and ensure that destination airport code corresponds to city equals Aberdeen.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen'" }, { "prediction": "world_1 | select city.name from city join country on city.countrycode = country.code join countrylanguage on city.countrycode = countrylanguage.countrycode where countrylanguage.language = 'english'", "gold_parse": "SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English')", "question": "Which cities are in European countries where English is not the official language?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = \"T\" EXCEPT SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = \"Europe\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in city table', \"Step 2: find city's Name of the results of step 1 whose Continent equals T\", \"Step 3: find city's Name of the results of step 1 whose Continent equals Europe\", 'Step 4: show the rows that are in the results of step 2 but not in the results of step 3']", "feedback": "in step 2 , you need to use is official and make sure english should not be the language , include countrylanguage , also make result visible for step 2 and 3. ", "context": "Which cities are in European countries where English is not the official language? || select city.name from city join country on city.countrycode = country.code where country.continent = 'T' except select city.name from city join country on city.countrycode = country.code where country.continent = 'Europe' || world_1 | city : name, countrycode | country : code, continent ( \"Europe\" ) | countrylanguage : countrycode, language ( \"english\" ) || in step 2, you need to use is official and make sure english should not be the language, include countrylanguage, also make result visible for step 2 and 3.", "label": "world_1 | select distinct city.name from country join city on city.countrycode = country.code where country.continent = 'Europe' and country.name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'English' )" }, { "prediction": "wta_1 | select avg ( rankings.player_id ), players.first_name from players join rankings on players.player_id = rankings.player_id group by players.first_name", "gold_parse": "SELECT avg(ranking) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "question": "Find the average ranking for each player and their first name.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Avg ( T2.winner_rank ) , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T1.first_name", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find each value of first_name in the results of step 1 along with the average winner_rank of the corresponding rows to each value']", "feedback": "In step 1 Substitute matches with rankings , In step 2 substitute winner rank with ranking .", "context": "Find the average ranking for each player and their first name. || select avg ( matches.winner_rank ), players.first_name from players join matches on players.player_id = matches.loser_id group by players.first_name || wta_1 | players : first_name, player_id | rankings : player_id || In step 1 Substitute matches with rankings, In step 2 substitute winner rank with ranking.", "label": "wta_1 | select avg ( ranking ), players.first_name from players join rankings on players.player_id = rankings.player_id group by players.first_name" }, { "prediction": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French'", "gold_parse": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"", "question": "What are the names of nations speak both English and French?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in countrylanguage table', 'Step 2: find Continent of the results of step 1 whose Language equals English', 'Step 3: find Continent of the results of step 1 whose Language equals French', 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "use name instead of continent in step 2 and 3.", "context": "What are the names of nations speak both English and French? || select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' || world_1 | country : name, code | countrylanguage : countrycode, language ( \"French\" ) || use name instead of continent in step 2 and 3.", "label": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French'" }, { "prediction": "flight_2 | select count ( * ) from flights join airports on flights.sourceairport = airports.flightno where airports.city = 'Aberdeen' or airports.city = 'Abilene'", "gold_parse": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", "question": "Find the number of flights landing in the city of Aberdeen or Abilene.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE City = \"Abilene\" OR City = \"Aberdeen\"", "predicted_parse_explanation": "['find the number of rows in airports table whose City equals Aberdeen or City equals Abilene']", "feedback": "You need to utilize table of flights rather than table of airports.", "context": "Find the number of flights landing in the city of Aberdeen or Abilene. || select count ( * ) from airports where city = 'Abilene' or city = 'Aberdeen' || flight_2 | flights : sourceairport, flightno | airports : city ( \"Abilene\" ) || You need to utilize table of flights rather than table of airports.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen' or airports.city = 'Abilene'" }, { "prediction": "world_1 | select name from country where continent = 'Europe' and population > 80000", "gold_parse": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"", "question": "What are the names of the countries that are in the continent of Europe and have a population of 80000?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country WHERE Continent = \"Europe\" INTERSECT SELECT Name FROM country WHERE Population > 103000", "predicted_parse_explanation": "['Step 1: find the Name of country table for which Continent equals Europe', 'Step 2: find the Name of country table for which Population greater than 103000', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "i want the population for zip code 80000.", "context": "What are the names of the countries that are in the continent of Europe and have a population of 80000? || select name from country where continent = 'Europe' intersect select name from country where population > 103000 || world_1 | country : name, continent ( \"Europe\" ), population ( 80000 ) || i want the population for zip code 80000.", "label": "world_1 | select name from country where continent = 'Europe' and population = '80000'" }, { "prediction": "dog_kennels | select professionals.first_name from professionals join owners on professionals.role_code = owners.owner_id except select professionals.first_name from professionals join dogs on owners.owner_id = dogs.owner_id", "gold_parse": "SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs", "question": "Find the first names that are used for professionals or owners but are not used as dog names.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T1.first_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.name = \"Kacey\" EXCEPT SELECT T1.first_name FROM Owners AS T1", "predicted_parse_explanation": "['Step 1: For each row in Owners table, find the corresponding rows in Dogs table', 'Step 2: find first_name of the results of step 1 whose name equals Kacey', 'Step 3: find the first_name of Owners table', 'Step 4: show the rows that are in the results of step 2 but not in the results of step 3']", "feedback": "Find first name for owners and professionals which is not used as a Dogs's name .", "context": "Find the first names that are used for professionals or owners but are not used as dog names. || select owners.first_name from owners join dogs on owners.owner_id = dogs.owner_id where dogs.name = 'Kacey' except select owners.first_name from owners as owners || dog_kennels | professionals : first_name, role_code | owners : first_name, owner_id | dogs : name, dog_id || Find first name for owners and professionals which is not used as a Dogs's name.", "label": "dog_kennels | select first_name from professionals union select first_name from owners except select name from dogs" }, { "prediction": "car_1 | select count ( * ), car_makers.id, car_makers.fullname from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id", "gold_parse": "SELECT Count(*) , T2.FullName , T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id", "question": "What is the number of car models that are produced by each maker and what is the id and full name of each maker?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T2.ModelId , T1.FullName , Count ( * ) FROM car_makers AS T1 JOIN model_list AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id", "predicted_parse_explanation": "['Step 1: For each row in car_makers table, find the corresponding rows in model_list table', 'Step 2: for each value of Id in the results of step 1, find the number of rows along with ModelId and FullName']", "feedback": "i want the number of rows of model list along with full name for each model corresponding to each id of car makers.", "context": "What is the number of car models that are produced by each maker and what is the id and full name of each maker? || select model_list.modelid, car_makers.fullname, count ( * ) from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id || car_1 | car_makers : id, fullname | model_list : maker || i want the number of rows of model list along with full name for each model corresponding to each id of car makers.", "label": "car_1 | select count ( * ), car_makers.fullname, car_makers.id from model_list join car_makers on model_list.maker = car_makers.id group by car_makers.id" }, { "prediction": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Asia' group by countrylanguage.language order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Asia\" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1", "question": "Which language is the most popular on the Asian continent?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Code2 FROM country WHERE Continent = \"Asia\" GROUP BY Code2 ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the rows in country table whose Continent equals Asia', 'Step 2: find each value of Code2 in the results of step 1 ordered descending by number of rows that correspond of each value', 'Step 3: only show the first row of the results']", "feedback": "You need to use language of country language.", "context": "Which language is the most popular on the Asian continent? || select code2 from country where continent = 'Asia' group by code2 order by count ( * ) desc limit 1 || world_1 | countrylanguage : language, countrycode | country : code, continent ( \"Asia\" ) || You need to use language of country language.", "label": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Asia' group by countrylanguage.language order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select count ( * ) from country where continent = 'Asia'", "gold_parse": "SELECT count(*) FROM country WHERE continent = \"Asia\"", "question": "Count the number of countries in Asia.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM city", "predicted_parse_explanation": "['find the number of rows in city table']", "feedback": "Find the number of rows in country table whose continent equals Asia .", "context": "Count the number of countries in Asia. || select count ( * ) from city || world_1 | country : continent ( \"Asia\" ) || Find the number of rows in country table whose continent equals Asia.", "label": "world_1 | select count ( * ) from country where continent = 'Asia'" }, { "prediction": "car_1 | select avg ( edispl ) from cars_data where model = 'Volvo'", "gold_parse": "SELECT avg(T2.edispl) FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T1.Model = 'volvo'", "question": "What is the average edispl for all volvos?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Avg ( Horsepower ) FROM cars_data", "predicted_parse_explanation": "['find the average Horsepower in cars_data table']", "feedback": "Replace horsepower with edispl .", "context": "What is the average edispl for all volvos? || select avg ( horsepower ) from cars_data || car_1 | cars_data : edispl, model ( \"Volvo\" ) || Replace horsepower with edispl.", "label": "car_1 | select avg ( cars_data.edispl ) from car_names join cars_data on car_names.makeid = cars_data.id where car_names.model = 'volvo'" }, { "prediction": "wta_1 | select ranking_date, count ( * ) from rankings group by ranking_date", "gold_parse": "SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date", "question": "Find the total number of tours for each ranking date.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , winner_rank FROM matches GROUP BY winner_rank", "predicted_parse_explanation": "['find each value of winner_rank in matches table along with the number of the corresponding rows to each value']", "feedback": "Find tours of ranking table for each value of ranking date .", "context": "Find the total number of tours for each ranking date. || select count ( * ), winner_rank from matches group by winner_rank || wta_1 | rankings : ranking_date, tours || Find tours of ranking table for each value of ranking date.", "label": "wta_1 | select sum ( tours ), ranking_date from rankings group by ranking_date" }, { "prediction": "cre_Doc_Template_Mgt | select count ( distinct template_id ) from documents", "gold_parse": "SELECT count(DISTINCT template_id) FROM Documents", "question": "Count the number of different templates used for documents.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "Find different template type code of reference template types table which used for documents .", "context": "Count the number of different templates used for documents. || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | documents : template_id || Find different template type code of reference template types table which used for documents.", "label": "cre_Doc_Template_Mgt | select count ( distinct template_id ) from documents" }, { "prediction": "tvshow | select title, directed_by from cartoon order by original_air_date asc", "gold_parse": "SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date", "question": "list all cartoon titles and their directors ordered by their air date", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Title , Directed_by FROM Cartoon ORDER BY Title Asc", "predicted_parse_explanation": "['find the Title, Directed_by of Cartoon table ordered ascending by Title']", "feedback": "I want original air date.", "context": "list all cartoon titles and their directors ordered by their air date || select title, directed_by from cartoon order by title asc || tvshow | cartoon : title, directed_by, original_air_date || I want original air date.", "label": "tvshow | select title, directed_by from cartoon order by original_air_date asc" }, { "prediction": "network_1 | select highschooler.name from highschooler join likes on highschooler.id = likes.student_id group by highschooler.id order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the high schooler who has the greatest number of likes?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler GROUP BY grade ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of grade in Highschooler table', 'Step 2: find name of Highschooler table with largest value in the results of step 1']", "feedback": "In step 1, you should provide the id of student from likes table.", "context": "What is the name of the high schooler who has the greatest number of likes? || select name from highschooler group by grade order by count ( * ) desc limit 1 || network_1 | highschooler : name, id | likes : student_id || In step 1, you should provide the id of student from likes table.", "label": "network_1 | select highschooler.name from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id order by count ( * ) desc limit 1" }, { "prediction": "tvshow | select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.id where cartoon.written_by = 'Todd Casey' and cartoon.directed_by = 'Ben Jones'", "gold_parse": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "question": "which countries' tv channels are playing some cartoon written by Todd Casey?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Todd Casey\" AND T2.Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find Country of the results of step 1 whose Written_by equals Todd Casey and Directed_by equals Ben Jones']", "feedback": "You need to drop And directed by equals Ben Jones.", "context": "which countries' tv channels are playing some cartoon written by Todd Casey? || select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey' and cartoon.directed_by = 'Ben Jones' || tvshow | tv_channel : country, id | cartoon : id, written_by ( \"Todd Casey\" ), directed_by ( \"Ben Jones\" ) || You need to drop And directed by equals Ben Jones.", "label": "tvshow | select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" }, { "prediction": "world_1 | select count ( * ) from country where governmentform = 'Republic'", "gold_parse": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"", "question": "How many countries have a republic as their form of government?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM country WHERE Continent = \"Republic\"", "predicted_parse_explanation": "['find the number of rows in country table whose Continent equals Republic']", "feedback": "Use government form in place of continent .", "context": "How many countries have a republic as their form of government? || select count ( * ) from country where continent = 'Republic' || world_1 | country : governmentform ( \"Republic\" ) || Use government form in place of continent.", "label": "world_1 | select count ( * ) from country where governmentform = 'Republic'" }, { "prediction": "voter_1 | select created from votes where state = 'CA'", "gold_parse": "SELECT max(created) FROM votes WHERE state = 'CA'", "question": "What is last date created of votes from the state 'CA'?", "db_id": "voter_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "AREA_CODE_STATE", "CONTESTANTS", "VOTES" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "area_code", "state", "contestant_number", "contestant_name", "vote_id", "phone_number", "state", "contestant_number", "created" ] }, "db_foreign_keys": { "column_id": [ 8, 7 ], "other_column_id": [ 3, 2 ] }, "predicted_parse_with_values": "SELECT created FROM VOTES WHERE state = \"CA\"", "predicted_parse_explanation": "['find the created of VOTES table for which state equals CA']", "feedback": "Make sure we determine the largest value of created.", "context": "What is last date created of votes from the state 'CA'? || select created from votes where state = 'CA' || voter_1 | votes : created, state ( \"CA\" ) || Make sure we determine the largest value of created.", "label": "voter_1 | select max ( created ) from votes where state = 'CA'" }, { "prediction": "world_1 | select count ( * ) from country where governmentform = 'Republic'", "gold_parse": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"", "question": "How many countries have governments that are republics?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Continent ) FROM country", "predicted_parse_explanation": "['find the number of different Continent in country table']", "feedback": "Find the number of rows of country table whose government form equals republics .", "context": "How many countries have governments that are republics? || select count ( distinct continent ) from country || world_1 | country : governmentform ( \"Republic\" ) || Find the number of rows of country table whose government form equals republics.", "label": "world_1 | select count ( * ) from country where governmentform = 'Republic'" }, { "prediction": "car_1 | select car_makers.id, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.makeid group by car_makers.id having count ( * ) >= 2 intersect select car_makers.id, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.makeid group by car_makers.makeid having count ( * ) >= 3", "gold_parse": "SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) >= 2 INTERSECT SELECT T1.Id , T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model GROUP BY T1.Id HAVING count(*) > 3", "question": "What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T3.MakeId , T1.Maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.Id = T2.Maker AND T1.Id = T2.Maker JOIN car_names AS T3 ON T2.Model = T3.Model WHERE T2.Model > = 2 INTERSECT SELECT T3.MakeId , T1.Maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.Id = T2.Maker AND T1.Id = T2.Maker JOIN car_names AS T3 ON T2.Model = T3.Model WHERE T2.Model > 3", "predicted_parse_explanation": "['Step 1: For each row in model_list table, find corresponding rows in car_makers table and in car_names table', \"Step 2: find MakeId, car_makers's Maker of the results of step 1 whose model_list's Model greater than or equals 2\", \"Step 3: find MakeId, car_makers's Maker of the results of step 1 whose model_list's Model greater than 3\", 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "Change make id with id in both step , ensure count of car is greater than 3 in step3.", "context": "What are the ids and makers of all car makers that produce at least 2 models and make more than 3 cars? || select car_names.makeid, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker and car_makers.id = model_list.maker join car_names on model_list.model = car_names.model where model_list.model > = 2 intersect select car_names.makeid, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker and car_makers.id = model_list.maker join car_names on model_list.model = car_names.model where model_list.model > 3 || car_1 | car_makers : id, maker | model_list : maker, model | car_names : makeid || Change make id with id in both step, ensure count of car is greater than 3 in step3.", "label": "car_1 | select car_makers.id, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id having count ( * ) >= 2 intersect select car_makers.id, car_makers.maker from car_makers join model_list on car_makers.id = model_list.maker join car_names on model_list.model = car_names.model group by car_makers.id having count ( * ) > 3" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the high schooler who has the greatest number of friends?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler GROUP BY grade ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of grade in Highschooler table', 'Step 2: find name of Highschooler table with largest value in the results of step 1']", "feedback": "There should be student id , friend table , not grade , high schooler table in step 1.", "context": "What is the name of the high schooler who has the greatest number of friends? || select name from highschooler group by grade order by count ( * ) desc limit 1 || network_1 | highschooler : name, id | friend : student_id || There should be student id, friend table, not grade, high schooler table in step 1.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id order by count ( * ) desc limit 1" }, { "prediction": "car_1 | select max ( accelerate ), cylinders from cars_data group by cylinders", "gold_parse": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders", "question": "What is the maximum accelerate for different number of cylinders?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Max ( Cylinders ) , Accelerate FROM cars_data GROUP BY Cylinders", "predicted_parse_explanation": "['find each value of Cylinders in cars_data table along with the maximum Cylinders of the corresponding rows to each value']", "feedback": "It should find maximum accelerate instead of maximum cylinders .", "context": "What is the maximum accelerate for different number of cylinders? || select max ( cylinders ), accelerate from cars_data group by cylinders || car_1 | cars_data : accelerate, cylinders || It should find maximum accelerate instead of maximum cylinders.", "label": "car_1 | select max ( accelerate ), cylinders from cars_data group by cylinders" }, { "prediction": "tvshow | select pixel_aspect_ratio_par, country from tv_channel where language!= 'english'", "gold_parse": "SELECT Pixel_aspect_ratio_PAR , country FROM tv_channel WHERE LANGUAGE != 'English'", "question": "What is the pixel aspect ratio and country of origin for all TV channels that do not use English?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Hight_definition_TV , Country FROM TV_Channel WHERE Language ! = \"English\"", "predicted_parse_explanation": "['find the Hight_definition_TV, Country of TV_Channel table for which Language not equals English']", "feedback": "High definition tv should be replace by Pixel aspect ratio par.", "context": "What is the pixel aspect ratio and country of origin for all TV channels that do not use English? || select hight_definition_tv, country from tv_channel where language! = 'English' || tvshow | tv_channel : pixel_aspect_ratio_par, country, language ( \"english\" ) || High definition tv should be replace by Pixel aspect ratio par.", "label": "tvshow | select pixel_aspect_ratio_par, country from tv_channel where language!= 'English'" }, { "prediction": "world_1 | select sum ( population ), avg ( surfacearea ) from country where surfacearea > 3000 and continent = 'North America'", "gold_parse": "SELECT sum(Population) , avg(SurfaceArea) FROM country WHERE Continent = \"North America\" AND SurfaceArea > 3000", "question": "Give the total population and average surface area corresponding to countries in Noth America that have a surface area greater than 3000.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Sum ( Population ) , Avg ( Continent ) FROM country WHERE SurfaceArea > 3000", "predicted_parse_explanation": "['find the summation of Population and the average Continent in country table whose SurfaceArea greater than 3000']", "feedback": "Change continent with surface area and Also Add continent equals North America .", "context": "Give the total population and average surface area corresponding to countries in Noth America that have a surface area greater than 3000. || select sum ( population ), avg ( continent ) from country where surfacearea > 3000 || world_1 | country : population, surfacearea ( 3000 ), continent ( \"North America\" ) || Change continent with surface area and Also Add continent equals North America.", "label": "world_1 | select sum ( population ), avg ( surfacearea ) from country where continent = 'North America' and surfacearea > 3000" }, { "prediction": "car_1 | select countryname from countries except select countries.countryname from countries join car_makers on countries.countryid = car_makers.country", "gold_parse": "SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId = T2.Country", "question": "What are the names of the countries with no car makers?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT CountryName FROM countries EXCEPT SELECT CountryName FROM countries", "predicted_parse_explanation": "['Step 1: find the CountryName of countries table', 'Step 2: find the CountryName of countries table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "In step 2 Replace country name of countries table with country of car makers table .", "context": "What are the names of the countries with no car makers? || select countryname from countries except select countryname from countries || car_1 | countries : countryname, countryid | car_makers : country || In step 2 Replace country name of countries table with country of car makers table.", "label": "car_1 | select countryname from countries except select countries.countryname from countries join car_makers on countries.countryid = car_makers.country" }, { "prediction": "world_1 | select continent from country where name = 'Anguilla'", "gold_parse": "SELECT Continent FROM country WHERE Name = \"Anguilla\"", "question": "Which continent is Anguilla in?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE LocalName = \"Anguilla\"", "predicted_parse_explanation": "['find the Continent of country table for which LocalName equals Anguilla']", "feedback": "i want the name in-place of local name.", "context": "Which continent is Anguilla in? || select continent from country where localname = 'Anguilla' || world_1 | country : continent, name ( \"Anguilla\" ) || i want the name in-place of local name.", "label": "world_1 | select continent from country where name = 'Anguilla'" }, { "prediction": "wta_1 | select avg ( loser_age ), avg ( winner_age ) from matches", "gold_parse": "SELECT avg(loser_age) , avg(winner_age) FROM matches", "question": "What are the average ages of losers and winners across matches?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Avg ( loser_age ) , Avg ( loser_age ) FROM matches", "predicted_parse_explanation": "['find the average loser_age and the average loser_age in matches table']", "feedback": "You have to use the age of winner.", "context": "What are the average ages of losers and winners across matches? || select avg ( loser_age ), avg ( loser_age ) from matches || wta_1 | matches : loser_age, winner_age || You have to use the age of winner.", "label": "wta_1 | select avg ( loser_age ), avg ( winner_age ) from matches" }, { "prediction": "dog_kennels | select owners.owner_id, owners.zip_code from owners join dogs on owners.owner_id = dogs.owner_id order by dogs.cost_of_treatment desc limit 1", "gold_parse": "SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1", "question": "Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.owner_id , T2.zip_code FROM Charges AS T1 JOIN Owners AS T2 GROUP BY T2.owner_id ORDER BY Sum ( T1.charge_amount ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Charges table, find the corresponding rows in Owners table', 'Step 2: find the summation of charge_amount of each value of owner_id in the results of step 1', 'Step 3: find owner_id, zip_code of step 1 results with largest value in the results of step 2']", "feedback": "i want the total of charge amount and total cost of treatment from treatments table.", "context": "Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code. || select owners.owner_id, owners.zip_code from charges join owners group by owners.owner_id order by sum ( charges.charge_amount ) desc limit 1 || dog_kennels | owners : owner_id, zip_code | dogs : owner_id, cost_of_treatment || i want the total of charge amount and total cost of treatment from treatments table.", "label": "dog_kennels | select owners.owner_id, owners.zip_code from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id group by owners.owner_id order by sum ( treatments.cost_of_treatment ) desc limit 1" }, { "prediction": "employee_hire_evaluation | select name from employee except select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id year_awarded", "gold_parse": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)", "question": "Find the names of employees who never won any award in the evaluation.", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT Name FROM employee EXCEPT SELECT Name FROM employee", "predicted_parse_explanation": "['Step 1: find the Name of employee table', 'Step 2: find the Name of employee table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "In step 2, Ensure that each employee id is there in evaluation table.", "context": "Find the names of employees who never won any award in the evaluation. || select name from employee except select name from employee || employee_hire_evaluation | employee : name, employee_id | evaluation : employee_id, year_awarded || In step 2, Ensure that each employee id is there in evaluation table.", "label": "employee_hire_evaluation | select name from employee where employee_id not in ( select employee_id from evaluation )" }, { "prediction": "student_transcripts_tracking | select courses.course_name, courses.course_id from courses join sections on courses.course_id = sections.course_id group by courses.course_name having count ( * ) < 2", "gold_parse": "SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2", "question": "What are the names and ids of every course with less than 2 sections?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name , course_id FROM Courses GROUP BY course_id HAVING Count ( * ) < 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of course_id in Courses table', 'Step 2: find course_name, course_id in Courses table whose corresponding value in step 1 is less than 2']", "feedback": "sections table must be used in place of courses table in step 1.", "context": "What are the names and ids of every course with less than 2 sections? || select course_name, course_id from courses group by course_id having count ( * ) < 2 || student_transcripts_tracking | courses : course_name, course_id | sections : course_id || sections table must be used in place of courses table in step 1.", "label": "student_transcripts_tracking | select courses.course_name, courses.course_id from courses join sections on courses.course_id = sections.course_id group by courses.course_id having count ( * ) <= 2" }, { "prediction": "car_1 | select min ( weight ) from cars_data where cylinders = 8 and year = 1974", "gold_parse": "SELECT Weight FROM CARS_DATA WHERE Cylinders = 4 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1", "question": "What is the smallest weight of the car produced with 8 cylinders on 1974?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Min ( Weight ) FROM cars_data WHERE Year = 1", "predicted_parse_explanation": "['find the minimum Weight in cars_data table whose Year equals 1']", "feedback": "Ensure year equals 1974 and cylinders equals 8.", "context": "What is the smallest weight of the car produced with 8 cylinders on 1974? || select min ( weight ) from cars_data where year = 1 || car_1 | cars_data : weight, cylinders ( 8 ), year ( 1974 ) || Ensure year equals 1974 and cylinders equals 8.", "label": "car_1 | select weight from cars_data where cylinders = 4 and year = 1974 order by weight asc limit 1" }, { "prediction": "flight_2 | select count ( * ) from airlines join flights on airlines.uid = flights.airport join airports on flights.destinationairport = airports.city where airports.city = 'Aberdeen'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = \"Aberdeen\" AND T3.Airline = \"United Airlines\"", "question": "How many United Airlines flights go to City 'Aberdeen'?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE Country = \"Aberdeen\" AND City = \"United Airlines\"", "predicted_parse_explanation": "['find the number of rows in airports table whose Country equals Aberdeen and City equals United Airlines']", "feedback": "You need to find rows count of flights for United airlines having Aberdeen as a destination airline.", "context": "How many United Airlines flights go to City 'Aberdeen'? || select count ( * ) from airports where country = 'Aberdeen' and city = 'United Airlines' || flight_2 | airlines : uid | flights : airline, destinationairport | airports : city ( \"Aberdeen\" ) || You need to find rows count of flights for United airlines having Aberdeen as a destination airline.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airlines on airlines.uid = flights.airline where airports.city = 'Aberdeen' and airlines.airline = 'United Airlines'" }, { "prediction": "student_transcripts_tracking | select transcript_date, transcript_id from transcripts group by transcript_id order by count ( * ) asc limit 1", "gold_parse": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1", "question": "Show the date of the transcript which shows the least number of results, also list the id.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT transcript_id , transcript_id FROM Transcript_Contents GROUP BY transcript_id ORDER BY Count ( * ) Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of transcript_id in Transcript_Contents table', 'Step 2: find transcript_id, transcript_id of Transcript_Contents table with smallest value in the results of step 1']", "feedback": "Replace first \"transcript id\" with Transcripts's transcript date in step 2.", "context": "Show the date of the transcript which shows the least number of results, also list the id. || select transcript_id, transcript_id from transcript_contents group by transcript_id order by count ( * ) asc limit 1 || student_transcripts_tracking | transcripts : transcript_date, transcript_id || Replace first \"transcript id\" with Transcripts's transcript date in step 2.", "label": "student_transcripts_tracking | select transcripts.transcript_date, transcript_contents.transcript_id from transcript_contents join transcripts on transcript_contents.transcript_id = transcripts.transcript_id group by transcript_contents.transcript_id order by count ( * ) asc limit 1" }, { "prediction": "orchestra | select record_company, count ( * ) from orchestra group by record_company", "gold_parse": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company", "question": "How many orchestras does each record company manage?", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , T1.Record_Company FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID", "predicted_parse_explanation": "['Step 1: For each row in orchestra table, find the corresponding rows in performance table', \"Step 2: find each value of performance's Orchestra_ID in the results of step 1 along with the number of the corresponding rows to each value\"]", "feedback": "I want the orchestra's record company in step 2.", "context": "How many orchestras does each record company manage? || select count ( * ), orchestra.record_company from orchestra join performance on orchestra.orchestra_id = performance.orchestra_id group by performance.orchestra_id || orchestra | orchestra : record_company || I want the orchestra's record company in step 2.", "label": "orchestra | select record_company, count ( * ) from orchestra group by record_company" }, { "prediction": "world_1 | select countrycode from countrylanguage where language!= 'english'", "gold_parse": "SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "question": "Return the country codes for countries that do not speak English.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Continent FROM country AS T1 EXCEPT SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\"", "predicted_parse_explanation": "['Step 1: find the Continent of country table', 'Step 2: For each row in country table, find the corresponding rows in countrylanguage table', 'Step 3: find Continent of the results of step 2 whose Language equals English', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "Change continent with code In step 1 and 3.", "context": "Return the country codes for countries that do not speak English. || select country.continent from country except select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' || world_1 | countrylanguage : countrycode, language ( \"english\" ) || Change continent with code In step 1 and 3.", "label": "world_1 | select countrycode from countrylanguage except select countrycode from countrylanguage where language = 'English'" }, { "prediction": "real_estate_properties | select ref_feature_types.feature_type_name from other_available_features join ref_feature_types on other_available_features.feature_id = ref_feature_types.feature_type_code where other_available_features.feature_name = 'AirCon'", "gold_parse": "SELECT T2.feature_type_name FROM Other_Available_Features AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code = T2.feature_type_code WHERE T1.feature_name = \"AirCon\"", "question": "What is the feature type name of feature AirCon?", "db_id": "real_estate_properties", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Feature_Types", "Ref_Property_Types", "Other_Available_Features", "Properties", "Other_Property_Features" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4 ], "column_name": [ "*", "feature_type_code", "feature_type_name", "property_type_code", "property_type_description", "feature_id", "feature_type_code", "feature_name", "feature_description", "property_id", "property_type_code", "date_on_market", "date_sold", "property_name", "property_address", "room_count", "vendor_requested_price", "buyer_offered_price", "agreed_selling_price", "apt_feature_1", "apt_feature_2", "apt_feature_3", "fld_feature_1", "fld_feature_2", "fld_feature_3", "hse_feature_1", "hse_feature_2", "hse_feature_3", "oth_feature_1", "oth_feature_2", "oth_feature_3", "shp_feature_1", "shp_feature_2", "shp_feature_3", "other_property_details", "property_id", "feature_id", "property_feature_description" ] }, "db_foreign_keys": { "column_id": [ 6, 10, 35, 36 ], "other_column_id": [ 1, 3, 9, 5 ] }, "predicted_parse_with_values": "SELECT feature_type_name FROM Ref_Feature_Types", "predicted_parse_explanation": "['find the feature_type_name of Ref_Feature_Types table']", "feedback": "have to find for whose corresponding feature name equals to AirCon .", "context": "What is the feature type name of feature AirCon? || select feature_type_name from ref_feature_types || real_estate_properties | ref_feature_types : feature_type_name, feature_type_code | other_available_features : feature_id, feature_name ( \"AirCon\" ) || have to find for whose corresponding feature name equals to AirCon.", "label": "real_estate_properties | select ref_feature_types.feature_type_name from other_available_features join ref_feature_types on other_available_features.feature_type_code = ref_feature_types.feature_type_code where other_available_features.feature_name = 'AirCon'" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT'", "gold_parse": "SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'", "question": "Count the number of documents that use the PPT template type.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Templates WHERE Template_Type_Code = \"PPT\"", "predicted_parse_explanation": "['find the number of rows in Templates table whose Template_Type_Code equals PPT']", "feedback": "You need to utilize table of documents.", "context": "Count the number of documents that use the PPT template type. || select count ( * ) from templates where template_type_code = 'PPT' || cre_Doc_Template_Mgt | documents : template_id | templates : template_id, template_type_code ( \"PPT\" ) || You need to utilize table of documents.", "label": "cre_Doc_Template_Mgt | select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT'" }, { "prediction": "car_1 | select model_list.model from model_list join cars_data on model_list.modelid = cars_data.id order by cars_data.mpg desc limit 1", "gold_parse": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1", "question": "Which model saves the most gasoline? That is to say, have the maximum miles per gallon.", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T1.Model FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id ORDER BY T3.Accelerate Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find model_list's Model of the results of step 1 with largest value of Accelerate\"]", "feedback": "It should be largest value of mpg not accelerate .", "context": "Which model saves the most gasoline? That is to say, have the maximum miles per gallon. || select model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id order by cars_data.accelerate desc limit 1 || car_1 | model_list : model, modelid | cars_data : id, mpg || It should be largest value of mpg not accelerate.", "label": "car_1 | select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id order by cars_data.mpg desc limit 1" }, { "prediction": "wta_1 | select loser_rank from matches group by loser_rank order by count ( * ) desc limit 1", "gold_parse": "SELECT min(loser_rank) FROM matches", "question": "What is the best rank of losers across all matches?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT loser_rank FROM matches", "predicted_parse_explanation": "['find the loser_rank of matches table']", "feedback": "Make sure to find loser rank which repeats most number of times .", "context": "What is the best rank of losers across all matches? || select loser_rank from matches || wta_1 | matches : loser_rank || Make sure to find loser rank which repeats most number of times.", "label": "wta_1 | select min ( loser_rank ) from matches" }, { "prediction": "world_1 | select countrycode from countrylanguage where language = 'English' or language = 'Dutch' isofficial", "gold_parse": "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND IsOfficial = \"T\" UNION SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\" AND IsOfficial = \"T\"", "question": "What are the countries where either English or Dutch is the official language?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE LocalName = \"T\" OR LocalName = \"Dutch\"", "predicted_parse_explanation": "['find Continent of country table whose LocalName equals Dutch or LocalName equals T']", "feedback": "use name and language in place of local name and local name respectively and also make sure is official is t.", "context": "What are the countries where either English or Dutch is the official language? || select continent from country where localname = 'T' or localname = 'Dutch' || world_1 | countrylanguage : countrycode, language ( \"Dutch\" ), isofficial || use name and language in place of local name and local name respectively and also make sure is official is t.", "label": "world_1 | select * from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and isofficial = 'T' union select * from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' and isofficial = 'T'" }, { "prediction": "concert_singer | select count ( * ) from singer", "gold_parse": "SELECT count(*) FROM singer", "question": "How many singers do we have?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM stadium", "predicted_parse_explanation": "['find the number of rows in stadium table']", "feedback": "supersede stadium table with singer table.", "context": "How many singers do we have? || select count ( * ) from stadium || concert_singer | singer : || supersede stadium table with singer table.", "label": "concert_singer | select count ( * ) from singer" }, { "prediction": "course_teach | select count ( * ) from teacher", "gold_parse": "SELECT count(*) FROM teacher", "question": "How many teachers are there?", "db_id": "course_teach", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "course", "teacher", "course_arrange" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2 ], "column_name": [ "*", "Course_ID", "Staring_Date", "Course", "Teacher_ID", "Name", "Age", "Hometown", "Course_ID", "Teacher_ID", "Grade" ] }, "db_foreign_keys": { "column_id": [ 9, 8 ], "other_column_id": [ 4, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM course", "predicted_parse_explanation": "['find the number of rows in course table']", "feedback": "You need to use teacher table.", "context": "How many teachers are there? || select count ( * ) from course || course_teach | teacher : || You need to use teacher table.", "label": "course_teach | select count ( * ) from teacher" }, { "prediction": "flight_2 | select count ( * ) from airlines join airports on airlines.uid = airports.airportcode join flights on airlines.uid = flights.sourceairport where airports.city = 'Aberdeen' and airlines.airline = 'United Airlines'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = \"Aberdeen\" AND T3.Airline = \"United Airlines\"", "question": "Count the number of United Airlines flights that arrive in Aberdeen.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"Aberdeen\" AND T1.Country = \"United Airlines\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in airports table', \"Step 2: find the number of rows in the results of step 1 whose airports's Country equals Aberdeen and airlines's Country equals United Airlines\"]", "feedback": "attach flights table. confirm that the city is aberdeen and airline is united citys as well as airport code is destination airport.", "context": "Count the number of United Airlines flights that arrive in Aberdeen. || select count ( * ) from airlines join airports where airports.country = 'Aberdeen' and airlines.country = 'United Airlines' || flight_2 | airlines : uid, airline ( \"United Airlines\" ) | airports : airportcode, city ( \"Aberdeen\" ) | flights : sourceairport, airline ( \"United Airlines\" ) || attach flights table. confirm that the city is aberdeen and airline is united citys as well as airport code is destination airport.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airlines on airlines.uid = flights.airline where airports.city = 'Aberdeen' and airlines.airline = 'United Airlines'" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Summer Show'", "gold_parse": "SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'", "question": "How many paragraphs for the document with name 'Summer Show'?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Documents WHERE Document_Name = \"Summer Show\"", "predicted_parse_explanation": "['find the number of rows in Documents table whose Document_Name equals Summer Show']", "feedback": "Supersede documents table with paragraphs table .", "context": "How many paragraphs for the document with name 'Summer Show'? || select count ( * ) from documents where document_name = 'Summer Show' || cre_Doc_Template_Mgt | paragraphs : document_id | documents : document_id, document_name ( \"Summer Show\" ) || Supersede documents table with paragraphs table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Summer Show'" }, { "prediction": "world_1 | select name, surfacearea from country order by surfacearea desc limit 5", "gold_parse": "SELECT Name , SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5", "question": "Return the names and surface areas of the 5 largest countries.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name , SurfaceArea FROM country ORDER BY Population Desc LIMIT 5", "predicted_parse_explanation": "['Step 1: find the Name, SurfaceArea of country table ordered descending by Population', 'Step 2: only show the first 5 rows of the results']", "feedback": "Interchange population with surface area .", "context": "Return the names and surface areas of the 5 largest countries. || select name, surfacearea from country order by population desc limit 5 || world_1 | country : name, surfacearea || Interchange population with surface area.", "label": "world_1 | select name, surfacearea from country order by surfacearea desc limit 5" }, { "prediction": "tvshow | select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'", "gold_parse": "SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "question": "which countries' tv channels are playing some cartoon written by Todd Casey?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Todd Casey\" AND T2.Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find Country of the results of step 1 whose Written_by equals Todd Casey and Directed_by equals Ben Jones']", "feedback": "Remove \"and directed by equals Ben Jones\".", "context": "which countries' tv channels are playing some cartoon written by Todd Casey? || select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey' and cartoon.directed_by = 'Ben Jones' || tvshow | tv_channel : country, id | cartoon : channel, written_by ( \"Todd Casey\" ) || Remove \"and directed by equals Ben Jones\".", "label": "tvshow | select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" }, { "prediction": "car_1 | select model from cars_data where cylinders = 4 group by model order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1", "question": "For all of the 4 cylinder cars, which model has the most horsepower?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Model FROM model_list GROUP BY Model ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Model in model_list table', 'Step 2: find Model of model_list table with largest value in the results of step 1']", "feedback": "Need to find model with highest value of horsepower whose cylinders equals 4.", "context": "For all of the 4 cylinder cars, which model has the most horsepower? || select model from model_list group by model order by count ( * ) desc limit 1 || car_1 | cars_data : model, cylinders ( 4 ), horsepower || Need to find model with highest value of horsepower whose cylinders equals 4.", "label": "car_1 | select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id where cars_data.cylinders = 4 order by cars_data.horsepower desc limit 1" }, { "prediction": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1", "question": "Give the name of the nation that uses the greatest amount of languages.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country GROUP BY Continent ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Continent in country table', 'Step 2: find Name of country table with largest value in the results of step 1']", "feedback": "Supersede continent with countrycode and country table with countrylanguage table in step 1.", "context": "Give the name of the nation that uses the greatest amount of languages. || select name from country group by continent order by count ( * ) desc limit 1 || world_1 | country : name, code | countrylanguage : countrycode || Supersede continent with countrycode and country table with countrylanguage table in step 1.", "label": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name order by count ( * ) desc limit 1" }, { "prediction": "orchestra | select name from conductor order by year_of_work desc limit 1", "gold_parse": "SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1", "question": "List the name of the conductor with the most years of work.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID ORDER BY T2.Year_of_Founded Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in conductor table, find the corresponding rows in orchestra table', 'Step 2: find Name of the results of step 1 with largest value of Year_of_Founded']", "feedback": "Need to find year of work in place of year of founded .", "context": "List the name of the conductor with the most years of work. || select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id order by orchestra.year_of_founded desc limit 1 || orchestra | conductor : name, year_of_work || Need to find year of work in place of year of founded.", "label": "orchestra | select name from conductor order by year_of_work desc limit 1" }, { "prediction": "car_1 | select avg ( horsepower ) from cars_data where year < 1980", "gold_parse": "SELECT avg(horsepower) FROM CARS_DATA WHERE YEAR < 1980", "question": "What is the average horsepower of the cars before 1980?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Avg ( Edispl ) FROM cars_data WHERE Year < 1980", "predicted_parse_explanation": "['find the average Edispl in cars_data table whose Year less than 1980']", "feedback": "edispl is wrong . Take horsepower in place of it .", "context": "What is the average horsepower of the cars before 1980? || select avg ( edispl ) from cars_data where year < 1980 || car_1 | cars_data : horsepower, year ( 1980 ) || edispl is wrong. Take horsepower in place of it.", "label": "car_1 | select avg ( horsepower ) from cars_data where year < 1980" }, { "prediction": "tvshow | select country from tv_channel where id not in ( select id from cartoon where written_by = 'Todd Casey' )", "gold_parse": "SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'", "question": "What are the countries that are not playing cartoons written by Todd Casey?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Michael Jelenic\" EXCEPT SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Todd Casey\" AND T2.Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find Country of the results of step 1 whose Written_by equals Michael Jelenic', 'Step 3: find Country of the results of step 1 whose Written_by equals Todd Casey and Directed_by equals Ben Jones', 'Step 4: show the rows that are in the results of step 2 but not in the results of step 3']", "feedback": "Here only need to find country whose written by should not be equals to Todd Casey", "context": "What are the countries that are not playing cartoons written by Todd Casey? || select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Michael Jelenic' except select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey' and cartoon.directed_by = 'Ben Jones' || tvshow | tv_channel : country, id | cartoon : id, written_by ( \"Todd Casey\" ) || Here only need to find country whose written by should not be equals to Todd Casey", "label": "tvshow | select country from tv_channel except select tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Todd Casey'" }, { "prediction": "course_teach | select teacher.name, count ( * ) from course join teacher on course.course_id = teacher.teacher_id group by teacher.name", "gold_parse": "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name", "question": "Show names of teachers and the number of courses they teach.", "db_id": "course_teach", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "course", "teacher", "course_arrange" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2 ], "column_name": [ "*", "Course_ID", "Staring_Date", "Course", "Teacher_ID", "Name", "Age", "Hometown", "Course_ID", "Teacher_ID", "Grade" ] }, "db_foreign_keys": { "column_id": [ 9, 8 ], "other_column_id": [ 4, 1 ] }, "predicted_parse_with_values": "SELECT Name , Count ( * ) FROM teacher GROUP BY Name", "predicted_parse_explanation": "['find each value of Name in teacher table along with the number of the corresponding rows to each value']", "feedback": "find corresponding rows to each value of teacher id in course arrange .", "context": "Show names of teachers and the number of courses they teach. || select name, count ( * ) from teacher group by name || course_teach | teacher : name, teacher_id | course : course_id || find corresponding rows to each value of teacher id in course arrange.", "label": "course_teach | select teacher.name, count ( * ) from course_arrange join teacher on course_arrange.teacher_id = teacher.teacher_id group by teacher.name" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.student_id join likes on friend.friend_id = likes.student_id intersect select highschooler.name from highschooler join likes on highschooler.id = likes.student_id join friend on likes.friend_id = friend.friend_id", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", "question": "What are the names of high schoolers who both have friends and are liked?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler WHERE grade = 9 INTERSECT SELECT name FROM Highschooler WHERE grade = 9", "predicted_parse_explanation": "['Step 1: find the name of Highschooler table for which grade equals 9', 'Step 2: find the name of Highschooler table for which grade equals 9', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "You have to assure the presence of student id in friend and likes table in step 1 and 2 respectively.", "context": "What are the names of high schoolers who both have friends and are liked? || select name from highschooler where grade = 9 intersect select name from highschooler where grade = 9 || network_1 | highschooler : name, id | friend : student_id, friend_id | likes : student_id || You have to assure the presence of student id in friend and likes table in step 1 and 2 respectively.", "label": "network_1 | select highschooler.name from friend join highschooler on likes.student_id = highschooler.id intersect select highschooler.name from likes join highschooler on likes.liked_id = highschooler.id" }, { "prediction": "course_teach | select count ( * ) from teacher", "gold_parse": "SELECT count(*) FROM teacher", "question": "What is the total count of teachers?", "db_id": "course_teach", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "course", "teacher", "course_arrange" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2 ], "column_name": [ "*", "Course_ID", "Staring_Date", "Course", "Teacher_ID", "Name", "Age", "Hometown", "Course_ID", "Teacher_ID", "Grade" ] }, "db_foreign_keys": { "column_id": [ 9, 8 ], "other_column_id": [ 4, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM course", "predicted_parse_explanation": "['find the number of rows in course table']", "feedback": "You need to use teacher table.", "context": "What is the total count of teachers? || select count ( * ) from course || course_teach | teacher : || You need to use teacher table.", "label": "course_teach | select count ( * ) from teacher" }, { "prediction": "world_1 | select countrycode from country where governmentform!= 'Republic' and countrylanguage.language!= 'english'", "gold_parse": "SELECT Code FROM country WHERE GovernmentForm != \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "question": "What are the codes of the countries that do not speak English and whose government forms are not Republic?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Code FROM country AS T1 WHERE T1.Continent = ( SELECT T2.CountryCode FROM countrylanguage AS T2 WHERE T2.Language = \"Republic\" ) EXCEPT SELECT T1.Code FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\"", "predicted_parse_explanation": "['Step 1: find the CountryCode of countrylanguage table for which Language equals Republic', 'Step 2: find the Code of country table whose Continent equals the results of step 1', 'Step 3: For each row in country table, find the corresponding rows in countrylanguage table', 'Step 4: find Code of the results of step 3 whose Language equals English', 'Step 5: show the rows that are in the results of step 2 but not in the results of step 4']", "feedback": "Exchange language with government form . ensure that are not in the results of step 2 and 4.", "context": "What are the codes of the countries that do not speak English and whose government forms are not Republic? || select country.code from country where country.continent = ( select countrylanguage.countrycode from countrylanguage where countrylanguage.language = 'Republic' ) except select country.code from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' || world_1 | country : code, governmentform ( \"Republic\" ) | countrylanguage : countrycode, language ( \"english\" ) || Exchange language with government form. ensure that are not in the results of step 2 and 4.", "label": "world_1 | select code from country where governmentform!= 'Republic' except select countrycode from countrylanguage where language = 'English'" }, { "prediction": "wta_1 | select players.first_name, players.country_code from players join matches on players.player_id = matches.winner_id where matches.turner_name = 'WTA Championships' intersect select players.first_name, players.country_code from players join matches on players.player_id = matches.winner_id where matches.turner_name = 'Australian Open'", "gold_parse": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'", "question": "What are the first names and country codes for players who won both the WTA Championships and the Australian Open?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.country_code FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id WHERE T2.loser_ioc = \"WTA Championships\" INTERSECT SELECT T1.first_name , T1.country_code FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id WHERE T2.loser_ioc = \"Australian Open\"", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find first_name, country_code of the results of step 1 whose loser_ioc equals WTA Championships', 'Step 3: find first_name, country_code of the results of step 1 whose loser_ioc equals Australian Open', 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "In both step 2 and in step 3 exchange loser ioc with tourney name .", "context": "What are the first names and country codes for players who won both the WTA Championships and the Australian Open? || select players.first_name, players.country_code from players join matches on players.player_id = matches.loser_id where matches.loser_ioc = 'WTA Championships' intersect select players.first_name, players.country_code from players join matches on players.player_id = matches.loser_id where matches.loser_ioc = 'Australian Open' || wta_1 | players : first_name, country_code, player_id | matches : winner_id, tourney_name ( \"Australian Open\" ) || In both step 2 and in step 3 exchange loser ioc with tourney name.", "label": "wta_1 | select players.country_code, players.first_name from players join matches on players.player_id = matches.winner_id where matches.tourney_name = 'WTA Championships' intersect select players.country_code, players.first_name from players join matches on players.player_id = matches.winner_id where matches.tourney_name = 'Australian Open'" }, { "prediction": "employee_hire_evaluation | select manager_name, district from shop order by number_products desc limit 1", "gold_parse": "SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1", "question": "What are the manager name and district of the shop that sells the largest number of products?", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT Manager_name , District FROM shop GROUP BY Shop_ID ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Shop_ID in shop table', 'Step 2: find Manager_name, District of shop table with largest value in the results of step 1']", "feedback": "Make sure to find number products for each shop in step 1.", "context": "What are the manager name and district of the shop that sells the largest number of products? || select manager_name, district from shop group by shop_id order by count ( * ) desc limit 1 || employee_hire_evaluation | shop : manager_name, district, number_products || Make sure to find number products for each shop in step 1.", "label": "employee_hire_evaluation | select manager_name, district from shop order by number_products desc limit 1" }, { "prediction": "world_1 | select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Afghanistan'", "gold_parse": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", "question": "How many official languages does Afghanistan have?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Code2 ) FROM country", "predicted_parse_explanation": "['find the number of different Code2 in country table']", "feedback": "Display number of rows of countrylanguage table whose country equals Afghanistan , mention is official equals T .", "context": "How many official languages does Afghanistan have? || select count ( distinct code2 ) from country || world_1 | countrylanguage : language, countrycode | country : code, name ( \"Afghanistan\" ) || Display number of rows of countrylanguage table whose country equals Afghanistan, mention is official equals T.", "label": "world_1 | select count ( * ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Afghanistan' and isofficial = 'T'" }, { "prediction": "world_1 | select count ( * ) from country join countrylanguage on country.continent = countrylanguage.countrycode where countrylanguage.language = 'Chinese'", "gold_parse": "SELECT COUNT( DISTINCT Continent) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Chinese\"", "question": "How many continents speak Chinese?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM country WHERE Continent = \"Chinese\"", "predicted_parse_explanation": "['find the number of rows in country table whose Continent equals Chinese']", "feedback": "use language of countrylanguage in place of continent.", "context": "How many continents speak Chinese? || select count ( * ) from country where continent = 'Chinese' || world_1 | country : continent, code | countrylanguage : countrycode, language ( \"Chinese\" ) || use language of countrylanguage in place of continent.", "label": "world_1 | select count ( distinct continent ) from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Chinese'" }, { "prediction": "tvshow | select package_option from tv_channel where id not in ( select channel from cartoon where directed_by = 'Ben Jones' )", "gold_parse": "SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones')", "question": "What are the package options of all tv channels that are not playing any cartoons directed by Ben Jones?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Package_Option FROM TV_Channel AS T1 EXCEPT SELECT T1.Package_Option FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: find the Package_Option of TV_Channel table', 'Step 2: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 3: find Package_Option of the results of step 2 whose Written_by equals Ben Jones', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "Change written by with directed by .", "context": "What are the package options of all tv channels that are not playing any cartoons directed by Ben Jones? || select tv_channel.package_option from tv_channel except select tv_channel.package_option from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Ben Jones' || tvshow | tv_channel : package_option, id | cartoon : channel, directed_by ( \"Ben Jones\" ) || Change written by with directed by.", "label": "tvshow | select package_option from tv_channel where id not in ( select channel from cartoon where directed_by = 'Ben Jones' )" }, { "prediction": "car_1 | select distinct model_list.model from car_makers join cars_data on car_makers.id = cars_data.id where car_makers.maker = 'General Motors' or cars_data.weight > 3500", "gold_parse": "SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500", "question": "What are the different models created by either the car maker General Motors or weighed more than 3500?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT DISTINCT T1.Model FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T3.Horsepower > 3500 OR T3.Horsepower = \"General Motors\"", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find without repetition model_list's Model of the results of step 1 whose Horsepower greater than General Motors or Horsepower equals 3500\"]", "feedback": "You need to find car makers table , Search for weight above 3500 and cylinders equivalent with General motors.", "context": "What are the different models created by either the car maker General Motors or weighed more than 3500? || select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.horsepower > 3500 or cars_data.horsepower = 'General Motors' || car_1 | model_list : model, maker | car_makers : id, maker ( \"General Motors\" ) | cars_data : id, weight ( 3500 ) || You need to find car makers table, Search for weight above 3500 and cylinders equivalent with General motors.", "label": "car_1 | select distinct model_list.model from car_names join model_list on car_names.model = model_list.model join car_makers on model_list.maker = car_makers.id join cars_data on car_names.makeid = cars_data.id where car_makers.fullname = 'General Motors' or cars_data.weight > 3500" }, { "prediction": "world_1 | select count ( * ) from countrylanguage where language = 'English' intersect select count ( * ) from countrylanguage where language = 'Dutch'", "gold_parse": "SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\")", "question": "What is the number of nations that use English and Dutch?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM city", "predicted_parse_explanation": "['find the number of rows in city table']", "feedback": "Change city table with country table , find for which countrylanguage's language equals English and Dutch .", "context": "What is the number of nations that use English and Dutch? || select count ( * ) from city || world_1 | countrylanguage : language ( \"Dutch\" ) || Change city table with country table, find for which countrylanguage's language equals English and Dutch.", "label": "world_1 | select count ( * ) from ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' )" }, { "prediction": "dog_kennels | select distinct breed_code, size_code from dogs", "gold_parse": "SELECT DISTINCT breed_code , size_code FROM dogs", "question": "Find the distinct breed type and size type combinations for dogs.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT DISTINCT T1.breed_name , T3.treatment_type_code FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id", "predicted_parse_explanation": "['Step 1: For each row in Dogs table, find corresponding rows in Breeds table and in Treatments table', 'Step 2: find without repetition breed_name, treatment_type_code of the results of step 1']", "feedback": "In step 2 Supersede treatment type code with size code .", "context": "Find the distinct breed type and size type combinations for dogs. || select distinct breeds.breed_name, treatments.treatment_type_code from breeds join dogs on breeds.breed_code = dogs.breed_code join treatments on dogs.dog_id = treatments.dog_id || dog_kennels | dogs : breed_code, size_code || In step 2 Supersede treatment type code with size code.", "label": "dog_kennels | select distinct breed_code, size_code from dogs" }, { "prediction": "world_1 | select language from countrylanguage group by language order by count ( * ) desc limit 1", "gold_parse": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1", "question": "Which language is spoken by the largest number of countries?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Code2 FROM country ORDER BY Continent Desc LIMIT 1", "predicted_parse_explanation": "['find the Code2 of country table with largest value of Continent']", "feedback": "Find number of rows of language in countrylanguage table .", "context": "Which language is spoken by the largest number of countries? || select code2 from country order by continent desc limit 1 || world_1 | countrylanguage : language || Find number of rows of language in countrylanguage table.", "label": "world_1 | select language from countrylanguage group by language order by count ( * ) desc limit 1" }, { "prediction": "student_transcripts_tracking | select semester_name from semesters where semester_id not in ( select semester_id from student_enrolment )", "gold_parse": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", "question": "What is the name of the semester with no students enrolled?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T1.course_name FROM Courses AS T1 WHERE T1.course_name NOT IN ( SELECT T2.semester_name FROM Semesters AS T2 )", "predicted_parse_explanation": "['Step 1: find the semester_name of Semesters table', 'Step 2: find the course_name of Courses table whose course_name not one of the results of step 1']", "feedback": "Semester id which does not exist in the student enrolment table look for such name of semester.", "context": "What is the name of the semester with no students enrolled? || select courses.course_name from courses where courses.course_name not in ( select semesters.semester_name from semesters ) || student_transcripts_tracking | semesters : semester_name, semester_id | student_enrolment : semester_id || Semester id which does not exist in the student enrolment table look for such name of semester.", "label": "student_transcripts_tracking | select semester_name from semesters where semester_id not in ( select semester_id from student_enrolment )" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "question": "Return the name of the high school student with the most friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler GROUP BY grade ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of grade in Highschooler table', 'Step 2: find name of Highschooler table with largest value in the results of step 1']", "feedback": "In step 1, you should use student id of friend table instead of grade of high schooler table.", "context": "Return the name of the high school student with the most friends. || select name from highschooler group by grade order by count ( * ) desc limit 1 || network_1 | highschooler : name, id | friend : student_id || In step 1, you should use student id of friend table instead of grade of high schooler table.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id order by count ( * ) desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select document_id, count ( * ) from paragraphs group by document_id order by count ( * ) asc", "gold_parse": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", "question": "Return the different document ids along with the number of paragraphs corresponding to each, ordered by id.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID , Count ( * ) FROM Paragraphs GROUP BY Document_ID ORDER BY Count ( * ) Asc", "predicted_parse_explanation": "['Step 1: for each value of Document_ID in Paragraphs table, calculate number of rows', 'Step 2: show each value of Document_ID in Paragraphs table along with the corresponding number of rows ordered ascending by the results of step 1']", "feedback": "Make sure to arrange Id of documents.", "context": "Return the different document ids along with the number of paragraphs corresponding to each, ordered by id. || select document_id, count ( * ) from paragraphs group by document_id order by count ( * ) asc || cre_Doc_Template_Mgt | paragraphs : document_id || Make sure to arrange Id of documents.", "label": "cre_Doc_Template_Mgt | select document_id, count ( * ) from paragraphs group by document_id order by document_id asc" }, { "prediction": "course_teach | select teacher.name, count ( * ) from course join teacher on course.course_id = teacher.teacher_id group by teacher.name", "gold_parse": "SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name", "question": "Show names of teachers and the number of courses they teach.", "db_id": "course_teach", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "course", "teacher", "course_arrange" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2 ], "column_name": [ "*", "Course_ID", "Staring_Date", "Course", "Teacher_ID", "Name", "Age", "Hometown", "Course_ID", "Teacher_ID", "Grade" ] }, "db_foreign_keys": { "column_id": [ 9, 8 ], "other_column_id": [ 4, 1 ] }, "predicted_parse_with_values": "SELECT Name , Count ( * ) FROM teacher GROUP BY Name", "predicted_parse_explanation": "['find each value of Name in teacher table along with the number of the corresponding rows to each value']", "feedback": "You need to look for correlated rows in course arrange to all value of teacher id.", "context": "Show names of teachers and the number of courses they teach. || select name, count ( * ) from teacher group by name || course_teach | teacher : name, teacher_id | course : course_id || You need to look for correlated rows in course arrange to all value of teacher id.", "label": "course_teach | select teacher.name, count ( * ) from course_arrange join teacher on course_arrange.teacher_id = teacher.teacher_id group by teacher.name" }, { "prediction": "cre_Doc_Template_Mgt | select version_number, template_type_code from templates order by version_number asc limit 1", "gold_parse": "SELECT min(Version_Number) , template_type_code FROM Templates", "question": "What the smallest version number and its template type code?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT * , Template_Type_Code FROM Templates ORDER BY Template_Type_Code Asc LIMIT 1", "predicted_parse_explanation": "['find the rows, Template_Type_Code of Templates table with smallest value of Template_Type_Code']", "feedback": "You have to replace \"smallest value of Template Type Code\" with \"smallest value of version number instead of\".", "context": "What the smallest version number and its template type code? || select *, template_type_code from templates order by template_type_code asc limit 1 || cre_Doc_Template_Mgt | templates : version_number, template_type_code || You have to replace \"smallest value of Template Type Code\" with \"smallest value of version number instead of\".", "label": "cre_Doc_Template_Mgt | select min ( version_number ), template_type_code from templates" }, { "prediction": "student_transcripts_tracking | select count ( * ) from transcripts", "gold_parse": "SELECT count(*) FROM Transcripts", "question": "How many transcripts are listed?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Addresses", "predicted_parse_explanation": "['find the number of rows in Addresses table']", "feedback": "You need to replace address with transcripts.", "context": "How many transcripts are listed? || select count ( * ) from addresses || student_transcripts_tracking | transcripts : || You need to replace address with transcripts.", "label": "student_transcripts_tracking | select count ( * ) from transcripts" }, { "prediction": "dog_kennels | select max ( age ) from dogs", "gold_parse": "SELECT max(age) FROM Dogs", "question": "What is the age of the oldest dog?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT age FROM Dogs ORDER BY age Asc LIMIT 1", "predicted_parse_explanation": "['find the age of Dogs table with smallest value of age']", "feedback": "Highest age is required, not the lowest.", "context": "What is the age of the oldest dog? || select age from dogs order by age asc limit 1 || dog_kennels | dogs : age || Highest age is required, not the lowest.", "label": "dog_kennels | select max ( age ) from dogs" }, { "prediction": "orchestra | select count ( * ), record_company from orchestra group by record_company", "gold_parse": "SELECT Record_Company , COUNT(*) FROM orchestra GROUP BY Record_Company", "question": "How many orchestras does each record company manage?", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , T1.Record_Company FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID", "predicted_parse_explanation": "['Step 1: For each row in orchestra table, find the corresponding rows in performance table', \"Step 2: find each value of performance's Orchestra_ID in the results of step 1 along with the number of the corresponding rows to each value\"]", "feedback": "In step 2 , Supplant performance's orchestra id with orchestra's record company .", "context": "How many orchestras does each record company manage? || select count ( * ), orchestra.record_company from orchestra join performance on orchestra.orchestra_id = performance.orchestra_id group by performance.orchestra_id || orchestra | orchestra : record_company || In step 2, Supplant performance's orchestra id with orchestra's record company.", "label": "orchestra | select record_company, count ( * ) from orchestra group by record_company" }, { "prediction": "student_transcripts_tracking | select first_name, middle_name, last_name from students order by date_first_registered asc limit 1", "gold_parse": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1", "question": "Who is the first student to register? List the first name, middle name and last name.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT first_name , middle_name , last_name FROM Students", "predicted_parse_explanation": "['find the first_name, middle_name, last_name of Students table']", "feedback": "You need look for student having lowest date for first registration.", "context": "Who is the first student to register? List the first name, middle name and last name. || select first_name, middle_name, last_name from students || student_transcripts_tracking | students : first_name, middle_name, last_name, date_first_registered || You need look for student having lowest date for first registration.", "label": "student_transcripts_tracking | select first_name, middle_name, last_name from students order by date_first_registered asc limit 1" }, { "prediction": "world_1 | select name from country where population < ( select min ( population ) from country where continent = 'Africa' )", "gold_parse": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT max(population) FROM country WHERE Continent = \"Asia\")", "question": "What are the African countries that have a population less than any country in Asia?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT GovernmentForm FROM country WHERE Population < ( SELECT Population FROM country WHERE Continent = \"Africa\" )", "predicted_parse_explanation": "['Step 1: find the Population of country table for which Continent equals Africa', 'Step 2: find the GovernmentForm of country table whose Population less than the results of step 1']", "feedback": "In step 1 find minimum population and swap Africa with Asia , in step 2 government form with name name .", "context": "What are the African countries that have a population less than any country in Asia? || select governmentform from country where population < ( select population from country where continent = 'Africa' ) || world_1 | country : name, population, continent ( \"Asia\" ) || In step 1 find minimum population and swap Africa with Asia, in step 2 government form with name name.", "label": "world_1 | select name from country where continent = 'Africa' and population < ( select max ( population ) from country where continent = 'Asia' )" }, { "prediction": "student_transcripts_tracking | select first_name, middle_name, last_name from students order by date_first_registered asc limit 1", "gold_parse": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1", "question": "What is the first, middle, and last name of the first student to register?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT first_name , middle_name , last_name FROM Students", "predicted_parse_explanation": "['find the first_name, middle_name, last_name of Students table']", "feedback": "Make sure first registered date is small.", "context": "What is the first, middle, and last name of the first student to register? || select first_name, middle_name, last_name from students || student_transcripts_tracking | students : first_name, middle_name, last_name, date_first_registered || Make sure first registered date is small.", "label": "student_transcripts_tracking | select first_name, middle_name, last_name from students order by date_first_registered asc limit 1" }, { "prediction": "world_1 | select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.indepyear < 1930", "gold_parse": "SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = \"T\"", "question": "What is the total number of unique official languages spoken in the countries that are founded before 1930?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Code2 ) FROM country WHERE IndepYear < 1930", "predicted_parse_explanation": "['find the number of different Code2 in country table whose IndepYear less than 1930']", "feedback": "i want the language mentioned in countrylanguage table. make certain that t is the corresponding is official.", "context": "What is the total number of unique official languages spoken in the countries that are founded before 1930? || select count ( distinct code2 ) from country where indepyear < 1930 || world_1 | countrylanguage : language, countrycode | country : code, indepyear ( 1930 ) || i want the language mentioned in countrylanguage table. make certain that t is the corresponding is official.", "label": "world_1 | select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where indepyear < 1930 and countrylanguage.isofficial = 'T'" }, { "prediction": "employee_hire_evaluation | select name from employee except select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id year_awarded", "gold_parse": "SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)", "question": "Find the names of employees who never won any award in the evaluation.", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT Name FROM employee EXCEPT SELECT Name FROM employee", "predicted_parse_explanation": "['Step 1: find the Name of employee table', 'Step 2: find the Name of employee table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "In step 2 , make sure corresponding employee id should be present in evaluation table .", "context": "Find the names of employees who never won any award in the evaluation. || select name from employee except select name from employee || employee_hire_evaluation | employee : name, employee_id | evaluation : employee_id, year_awarded || In step 2, make sure corresponding employee id should be present in evaluation table.", "label": "employee_hire_evaluation | select name from employee where employee_id not in ( select employee_id from evaluation )" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs", "gold_parse": "SELECT count(*) FROM Paragraphs", "question": "How many paragraphs in total?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "You need to calculate number of rows of paragraphs table.", "context": "How many paragraphs in total? || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | paragraphs : || You need to calculate number of rows of paragraphs table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from paragraphs" }, { "prediction": "student_transcripts_tracking | select first_name, middle_name, last_name from students order by date_first_registered asc limit 1", "gold_parse": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1", "question": "Who is the first student to register? List the first name, middle name and last name.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT first_name , middle_name , last_name FROM Students", "predicted_parse_explanation": "['find the first_name, middle_name, last_name of Students table']", "feedback": "Find for student whose date first registered value is smallest .", "context": "Who is the first student to register? List the first name, middle name and last name. || select first_name, middle_name, last_name from students || student_transcripts_tracking | students : first_name, middle_name, last_name, date_first_registered || Find for student whose date first registered value is smallest.", "label": "student_transcripts_tracking | select first_name, middle_name, last_name from students order by date_first_registered asc limit 1" }, { "prediction": "pets_1 | select student.fname, student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where pets.pettype = 'cat' intersect select student.fname, student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where pets.pettype = 'dog'", "gold_parse": "SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog'", "question": "Find the name of students who have both cat and dog pets.", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT T1.Fname FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID JOIN Pets AS T3 ON T2.PetID = T3.PetID WHERE T3.PetType = \"cat\" INTERSECT SELECT T2.StuID FROM Has_Pet AS T2 JOIN Pets AS T3 ON T2.PetID = T3.PetID WHERE T3.PetType = \"dog\"", "predicted_parse_explanation": "['Step 1: For each row in Has_Pet table, find corresponding rows in Student table and in Pets table', 'Step 2: find Fname of the results of step 1 whose PetType equals cat', 'Step 3: For each row in Pets table, find the corresponding rows in Has_Pet table', \"Step 4: find Has_Pet's StuID of the results of step 3 whose PetType equals dog\", 'Step 5: show the rows that are in both the results of step 2 and the results of step 4']", "feedback": "Find first name , last name of student table whose pet type equals cat and pet type equals dog .", "context": "Find the name of students who have both cat and dog pets. || select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where pets.pettype = 'cat' intersect select has_pet.stuid from has_pet join pets on has_pet.petid = pets.petid where pets.pettype = 'dog' || pets_1 | student : fname, lname, stuid | has_pet : stuid, petid | pets : petid, pettype ( \"dog\" ) || Find first name, last name of student table whose pet type equals cat and pet type equals dog.", "label": "pets_1 | select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' intersect select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog'" }, { "prediction": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1", "question": "What is name of the country that speaks the largest number of languages?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country GROUP BY Continent ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Continent in country table', 'Step 2: find Continent of country table with largest value in the results of step 1']", "feedback": "You need to search name of a country where highest amount of languages are used.", "context": "What is name of the country that speaks the largest number of languages? || select continent from country group by continent order by count ( * ) desc limit 1 || world_1 | country : name, code | countrylanguage : countrycode || You need to search name of a country where highest amount of languages are used.", "label": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode group by country.name order by count ( * ) desc limit 1" }, { "prediction": "pets_1 | select student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where pets.pettype = 'cat' and has_pet.stuid = 3", "gold_parse": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'", "question": "What is the last name of the student who has a cat that is 3 years old?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT LName FROM Student WHERE Age = 3", "predicted_parse_explanation": "['find the LName of Student table for which Age equals 3']", "feedback": "Need to ensure \"Pet's pet age\" in place of \"Age\".", "context": "What is the last name of the student who has a cat that is 3 years old? || select lname from student where age = 3 || pets_1 | student : lname, stuid, age ( 3 ) | has_pet : stuid, petid | pets : petid, pettype ( \"cat\" ) || Need to ensure \"Pet's pet age\" in place of \"Age\".", "label": "pets_1 | select student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pet_age = 3 and pets.pettype = 'cat'" }, { "prediction": "singer | select citizenship from singer where birth_year < 1945 intersect select citizenship from singer where birth_year > 1955", "gold_parse": "SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955", "question": "What are the citizenships that are shared by singers with a birth year before 1945 and after 1955?", "db_id": "singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "singer", "song" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Singer_ID", "Name", "Birth_Year", "Net_Worth_Millions", "Citizenship", "Song_ID", "Title", "Singer_ID", "Sales", "Highest_Position" ] }, "db_foreign_keys": { "column_id": [ 8 ], "other_column_id": [ 1 ] }, "predicted_parse_with_values": "SELECT Citizenship FROM singer WHERE Birth_Year > 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year < 1955", "predicted_parse_explanation": "['Step 1: find the Citizenship of singer table for which Birth_Year greater than 1945', 'Step 2: find the Citizenship of singer table for which Birth_Year less than 1955', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Ensure to swap \"greater than\" and \"less than\" with each other .", "context": "What are the citizenships that are shared by singers with a birth year before 1945 and after 1955? || select citizenship from singer where birth_year > 1945 intersect select citizenship from singer where birth_year < 1955 || singer | singer : citizenship, birth_year ( 1955 ) || Ensure to swap \"greater than\" and \"less than\" with each other.", "label": "singer | select citizenship from singer where birth_year < 1945 intersect select citizenship from singer where birth_year > 1955" }, { "prediction": "dog_kennels | select professionals.first_name, professionals.last_name from professionals join treatments on professionals.professional_id = treatments.professional_id where treatments.cost_of_treatment < ( select avg ( cost_of_treatment ) from treatments )", "gold_parse": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )", "question": "What are the first name and last name of the professionals who have done treatment with cost below average?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.first_name , T2.last_name FROM Charges AS T1 JOIN Professionals AS T2 WHERE T1.charge_amount < ( SELECT Avg ( T1.charge_amount ) FROM Charges AS T1 )", "predicted_parse_explanation": "['Step 1: find the average charge_amount in Charges table', 'Step 2: For each row in Charges table, find the corresponding rows in Professionals table', 'Step 3: find first_name, last_name in the results of step 2 whose charge_amount less than the results of step 1']", "feedback": "in step 1 use cost of treatment of treatments and in step 3 use treatments's cost of treatment of treatment.", "context": "What are the first name and last name of the professionals who have done treatment with cost below average? || select professionals.first_name, professionals.last_name from charges join professionals where charges.charge_amount < ( select avg ( charges.charge_amount ) from charges ) || dog_kennels | professionals : first_name, last_name, professional_id | treatments : professional_id, cost_of_treatment || in step 1 use cost of treatment of treatments and in step 3 use treatments's cost of treatment of treatment.", "label": "dog_kennels | select distinct professionals.first_name, professionals.last_name from professionals join treatments where cost_of_treatment < ( select avg ( cost_of_treatment ) from treatments )" }, { "prediction": "wta_1 | select winner_name, loser_name from matches order by minutes asc limit 1", "gold_parse": "SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1", "question": "What are the names of the winner and loser who played in the longest match?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T2.winner_name , T1.last_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id ORDER BY T2.winner_name Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find winner_name, last_name of the results of step 1 with smallest value of winner_name']", "feedback": "Need to replace last name, lowest winner name value with name of loser and minutes highest value.", "context": "What are the names of the winner and loser who played in the longest match? || select matches.winner_name, players.last_name from players join matches on players.player_id = matches.loser_id order by matches.winner_name asc limit 1 || wta_1 | matches : winner_name, loser_name, minutes || Need to replace last name, lowest winner name value with name of loser and minutes highest value.", "label": "wta_1 | select winner_name, loser_name from matches order by minutes desc limit 1" }, { "prediction": "student_transcripts_tracking | select semesters.semester_name, semesters.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id group by semesters.semester_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1", "question": "For each semester, what is the name and id of the one with the most students registered?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT semester_name , semester_id FROM Semesters GROUP BY semester_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of semester_id in Semesters table', 'Step 2: find semester_name, semester_id of Semesters table with largest value in the results of step 1']", "feedback": "in step 1 , use student enrolment instead", "context": "For each semester, what is the name and id of the one with the most students registered? || select semester_name, semester_id from semesters group by semester_id order by count ( * ) desc limit 1 || student_transcripts_tracking | semesters : semester_name, semester_id | student_enrolment : semester_id || in step 1, use student enrolment instead", "label": "student_transcripts_tracking | select semesters.semester_name, semesters.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id group by semesters.semester_id order by count ( * ) desc limit 1" }, { "prediction": "student_transcripts_tracking | select students.first_name, students.middle_name, students.last_name, student_enrolment.student_id from student_enrolment join students on student_enrolment.student_id = students.student_id where student_enrolment.degree_program_id = ( select degree_program_id from student_enrolment group by student_enrolment.degree_program_id having count ( * ) = 2", "gold_parse": "SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2", "question": "What are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T2.student_id HAVING Count ( * ) = 2", "predicted_parse_explanation": "['Step 1: For each row in Students table, find the corresponding rows in Student_Enrolment table', \"Step 2: find the number of rows of each value of Student_Enrolment's student_id in the results of step 1\", 'Step 3: find first_name, middle_name, last_name in the results of step 1 whose corresponding value in step 2 is equals 2']", "feedback": "in step 2 make sure it is the same semester . also output student id", "context": "What are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester? || select students.first_name, students.middle_name, students.last_name from students join student_enrolment on students.student_id = student_enrolment.student_id group by student_enrolment.student_id having count ( * ) = 2 || student_transcripts_tracking | students : first_name, middle_name, last_name, student_id | student_enrolment : student_id, degree_program_id || in step 2 make sure it is the same semester. also output student id", "label": "student_transcripts_tracking | select students.first_name, students.middle_name, students.last_name, students.student_id from students join student_enrolment on students.student_id = student_enrolment.student_id group by students.student_id having count ( * ) = 2" }, { "prediction": "tvshow | select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Ben Jones' intersect select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Michael Chang'", "gold_parse": "SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'", "question": "Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.series_name , T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Michael Chang\" AND T2.Written_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find series_name, Country of the results of step 1 whose Written_by equals Ben Jones and Written_by equals Michael Chang']", "feedback": "It should be directed by , not written by at both in step 2.", "context": "Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang? || select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Michael Chang' and cartoon.written_by = 'Ben Jones' || tvshow | tv_channel : series_name, country, id | cartoon : channel, directed_by ( \"Michael Chang\" ) || It should be directed by, not written by at both in step 2.", "label": "tvshow | select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Michael Chang' intersect select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Ben Jones'" }, { "prediction": "student_transcripts_tracking | select count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id where departments.department_name = 'engineer'", "gold_parse": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", "question": "How many degrees does the engineering department offer?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Departments WHERE department_name = \"engineer\"", "predicted_parse_explanation": "['find the number of rows in Departments table whose department_name equals engineer']", "feedback": "Exchange departments table with degree programs table .", "context": "How many degrees does the engineering department offer? || select count ( * ) from departments where department_name = 'engineer' || student_transcripts_tracking | departments : department_id, department_name ( \"engineer\" ) | degree_programs : department_id || Exchange departments table with degree programs table.", "label": "student_transcripts_tracking | select count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id where departments.department_name = 'engineer'" }, { "prediction": "car_1 | select countries.countryname, car_makers.country from countries join car_makers on countries.countryid = car_makers.id group by car_makers.id having count ( * ) >= 1", "gold_parse": "SELECT T1.CountryName , T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING count(*) >= 1", "question": "What are the countries having at least one car maker? List name and id.", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Country , Id FROM car_makers GROUP BY Country HAVING Count ( * ) > = 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Country in car_makers table', 'Step 2: find Country, Id in car_makers table whose corresponding value in step 1 is greater than or equals 1']", "feedback": "in step 2 , i want the name of country , country id , country id table.", "context": "What are the countries having at least one car maker? List name and id. || select country, id from car_makers group by country having count ( * ) > = 1 || car_1 | countries : countryname, countryid | car_makers : country, id || in step 2, i want the name of country, country id, country id table.", "label": "car_1 | select countries.countryname, countries.countryid from countries join car_makers on countries.countryid = car_makers.country group by countries.countryid having count ( * ) >= 1" }, { "prediction": "flight_2 | select count ( * ) from airports", "gold_parse": "SELECT count(*) FROM AIRPORTS", "question": "Return the number of airports.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines", "predicted_parse_explanation": "['find the number of rows in airlines table']", "feedback": "I want the rows count from airport table.", "context": "Return the number of airports. || select count ( * ) from airlines || flight_2 | airports : || I want the rows count from airport table.", "label": "flight_2 | select count ( * ) from airports" }, { "prediction": "flight_2 | select count ( * ) from airlines join airports on airlines.uid = airports.airportcode join flights on airlines.uid = flights.sourceairport where airports.city = 'Aberdeen' and airlines.airline = 'United Airlines'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = \"Aberdeen\" AND T3.Airline = \"United Airlines\"", "question": "Count the number of United Airlines flights that arrive in Aberdeen.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"Aberdeen\" AND T1.Country = \"United Airlines\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in airports table', \"Step 2: find the number of rows in the results of step 1 whose airports's Country equals Aberdeen and airlines's Country equals United Airlines\"]", "feedback": "Add flights table . Ensure city equals Aberdeen , airline equals United airlines , Make sure airport code equals destination airport .", "context": "Count the number of United Airlines flights that arrive in Aberdeen. || select count ( * ) from airlines join airports where airports.country = 'Aberdeen' and airlines.country = 'United Airlines' || flight_2 | airlines : uid, airline ( \"United Airlines\" ) | airports : airportcode, city ( \"Aberdeen\" ) | flights : sourceairport, airline ( \"United Airlines\" ) || Add flights table. Ensure city equals Aberdeen, airline equals United airlines, Make sure airport code equals destination airport.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airlines on airlines.uid = flights.airline where airports.city = 'Aberdeen' and airlines.airline = 'United Airlines'" }, { "prediction": "wta_1 | select count ( * ), hand from players group by hand", "gold_parse": "SELECT count(*) , hand FROM players GROUP BY hand", "question": "How many players are there for each hand type?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , T1.hand FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T2.loser_id", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find each value of loser_id in the results of step 1 along with the number of the corresponding rows to each value']", "feedback": "Need to replace loser id with hand .", "context": "How many players are there for each hand type? || select count ( * ), players.hand from players join matches on players.player_id = matches.loser_id group by matches.loser_id || wta_1 | players : hand || Need to replace loser id with hand.", "label": "wta_1 | select count ( * ), hand from players group by hand" }, { "prediction": "network_1 | select highschooler.name from highschooler join likes on highschooler.id = likes.student_id group by likes.student_id having count ( * ) >= 2", "gold_parse": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2", "question": "What are the names of students who have 2 or more likes?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.name FROM Highschooler AS T1 JOIN Friend AS T2 ON T1.ID = T2.student_id GROUP BY T2.student_id HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: For each row in Highschooler table, find the corresponding rows in Friend table', 'Step 2: find the number of rows of each value of student_id in the results of step 1', 'Step 3: find name in the results of step 1 whose corresponding value in step 2 is greater than or equals 2']", "feedback": "In step 1 change friend table with likes table .", "context": "What are the names of students who have 2 or more likes? || select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id having count ( * ) > = 2 || network_1 | highschooler : name, id | likes : student_id || In step 1 change friend table with likes table.", "label": "network_1 | select highschooler.name from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id having count ( * ) >= 2" }, { "prediction": "tvshow | select episode, rating from tv_series group by episode order by count ( * ) desc limit 3", "gold_parse": "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3", "question": "What are 3 most highly rated episodes in the TV series table and what were those ratings?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Rating , T1.Rating FROM TV_series AS T1 GROUP BY T1.Rating ORDER BY Count ( * ) Desc LIMIT 1 INTERSECT SELECT T1.Rating FROM TV_Channel AS T2 JOIN TV_series AS T1 ON T2.id = T1.Channel GROUP BY T2.Hight_definition_TV ORDER BY Count ( * ) Desc LIMIT 3", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Rating in TV_series table', 'Step 2: find Rating, Rating of TV_series table ordered descending by the results of step 1', 'Step 3: For each row in TV_Channel table, find the corresponding rows in TV_series table', 'Step 4: find the number of rows of each value of Hight_definition_TV in the results of step 3', 'Step 5: find Rating of step 3 results ordered descending by the results of step 4', 'Step 6: only keep the first row of the results of step 5', 'Step 7: show the rows that are in both the results of step 2 and the results of step 6', 'Step 8: only show the first 3 rows of the results']", "feedback": "Just view the first 3 episode and rating from tv series table arrange rating in descending order.", "context": "What are 3 most highly rated episodes in the TV series table and what were those ratings? || select tv_series.rating, tv_series.rating from tv_series group by tv_series.rating order by count ( * ) desc limit 1 intersect select tv_series.rating from tv_channel join tv_series on tv_channel.id = tv_series.channel group by tv_channel.hight_definition_tv order by count ( * ) desc limit 3 || tvshow | tv_series : episode, rating || Just view the first 3 episode and rating from tv series table arrange rating in descending order.", "label": "tvshow | select episode, rating from tv_series order by rating desc limit 3" }, { "prediction": "dog_kennels | select treatments.date_of_treatment, professionals.first_name from treatments join professionals on treatments.professional_id = professionals.professional_id", "gold_parse": "SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id", "question": "List the date of each treatment, together with the first name of the professional who operated it.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T1.date_adopted , T2.first_name FROM Dogs AS T1 JOIN Professionals AS T2 JOIN Treatments AS T3 ON T1.dog_id = T3.dog_id AND T3.professional_id = T2.professional_id", "predicted_parse_explanation": "['Step 1: For each row in Treatments table, find corresponding rows in Dogs table and in Professionals table', 'Step 2: find date_adopted, first_name of the results of step 1']", "feedback": "in step 2, i want date of treatment.", "context": "List the date of each treatment, together with the first name of the professional who operated it. || select dogs.date_adopted, professionals.first_name from dogs join professionals join treatments on dogs.dog_id = treatments.dog_id and treatments.professional_id = professionals.professional_id || dog_kennels | treatments : date_of_treatment, professional_id | professionals : first_name, professional_id || in step 2, i want date of treatment.", "label": "dog_kennels | select treatments.date_of_treatment, professionals.first_name from treatments join professionals on treatments.professional_id = professionals.professional_id" }, { "prediction": "tvshow | select title from cartoon where directed_by = 'Ben Jones' or directed_by = 'Brandon Vietti'", "gold_parse": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\"", "question": "List the title of all cartoon directed by \"Ben Jones\" or \"Brandon Vietti\".", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Title FROM Cartoon WHERE Written_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\"", "predicted_parse_explanation": "['find Title of Cartoon table whose Written_by equals Ben Jones or Directed_by equals Brandon Vietti']", "feedback": "You should use directed by instead of written by.", "context": "List the title of all cartoon directed by \"Ben Jones\" or \"Brandon Vietti\". || select title from cartoon where written_by = 'Ben Jones' or directed_by = 'Brandon Vietti' || tvshow | cartoon : title, directed_by ( \"Brandon Vietti\" ) || You should use directed by instead of written by.", "label": "tvshow | select title from cartoon where directed_by = 'Ben Jones' or directed_by = 'Brandon Vietti'" }, { "prediction": "car_1 | select count ( * ) from car_makers where country = 'France'", "gold_parse": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france'", "question": "What is the number of makers of care in France?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM car_makers WHERE Country = \"france\"", "predicted_parse_explanation": "['find the number of rows in car_makers table whose Country equals france']", "feedback": "Need to ensure Country's corresponding country name equals france instead of \"Country equals france\".", "context": "What is the number of makers of care in France? || select count ( * ) from car_makers where country = 'france' || car_1 | car_makers : country ( \"France\" ) || Need to ensure Country's corresponding country name equals france instead of \"Country equals france\".", "label": "car_1 | select count ( * ) from car_makers join countries on car_makers.country = countries.countryid where countries.countryname = 'france'" }, { "prediction": "network_1 | select highschooler.name from highschooler join likes on highschooler.id = likes.student_id group by likes.student_id having count ( * ) >= 2", "gold_parse": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2", "question": "Show the names of students who have at least 2 likes.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.name FROM Highschooler AS T1 JOIN Friend AS T2 ON T1.ID = T2.student_id GROUP BY T2.student_id HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: For each row in Highschooler table, find the corresponding rows in Friend table', 'Step 2: find the number of rows of each value of student_id in the results of step 1', 'Step 3: find name in the results of step 1 whose corresponding value in step 2 is greater than or equals 2']", "feedback": "In step 1 , I want the likes table.", "context": "Show the names of students who have at least 2 likes. || select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id having count ( * ) > = 2 || network_1 | highschooler : name, id | likes : student_id || In step 1, I want the likes table.", "label": "network_1 | select highschooler.name from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id having count ( * ) >= 2" }, { "prediction": "dog_kennels | select professionals.first_name, professionals.last_name from professionals join treatments on professionals.professional_id = treatments.professional_id where treatments.cost_of_treatment < ( select avg ( cost_of_treatment ) from treatments )", "gold_parse": "SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )", "question": "Which professionals have operated a treatment that costs less than the average? Give me theor first names and last names.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.first_name , T2.last_name FROM Charges AS T1 JOIN Professionals AS T2 WHERE T1.charge_amount < ( SELECT Avg ( T1.charge_amount ) FROM Charges AS T1 )", "predicted_parse_explanation": "['Step 1: find the average charge_amount in Charges table', 'Step 2: For each row in Charges table, find the corresponding rows in Professionals table', 'Step 3: find first_name, last_name in the results of step 2 whose charge_amount less than the results of step 1']", "feedback": "you need to swap between charges and treatments table in step 2 and in each and every step use cost of treatment, treatments tabl.", "context": "Which professionals have operated a treatment that costs less than the average? Give me theor first names and last names. || select professionals.first_name, professionals.last_name from charges join professionals where charges.charge_amount < ( select avg ( charges.charge_amount ) from charges ) || dog_kennels | professionals : first_name, last_name, professional_id | treatments : professional_id, cost_of_treatment || you need to swap between charges and treatments table in step 2 and in each and every step use cost of treatment, treatments tabl.", "label": "dog_kennels | select distinct professionals.first_name, professionals.last_name from professionals join treatments where cost_of_treatment < ( select avg ( cost_of_treatment ) from treatments )" }, { "prediction": "flight_2 | select count ( * ) from airports join flights on airports.city = flights.sourceairport and flights.flightno = flights.flightno where airports.city = 'Aberdeen' and airports.airportname = 'Ashley'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"", "question": "How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE AirportName = \"Ashley\" AND City = \"Aberdeen\"", "predicted_parse_explanation": "['find the number of rows in airports table whose AirportName equals Ashley and City equals Aberdeen']", "feedback": "use flights and for ashley and aberdeen search for source airportiation.", "context": "How many flights depart from City 'Aberdeen' and have destination City 'Ashley'? || select count ( * ) from airports where airportname = 'Ashley' and city = 'Aberdeen' || flight_2 | airports : city ( \"Aberdeen\" ), airportname ( \"Ashley\" ) | flights : sourceairport, flightno || use flights and for ashley and aberdeen search for source airportiation.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airports on flights.sourceairport = airports.airportcode where airports.city = 'Ashley' and airports.city = 'Aberdeen'" }, { "prediction": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1", "question": "What is the airport code of the airport with the most flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT DestAirport FROM flights GROUP BY DestAirport ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of DestAirport in flights table', 'Step 2: find DestAirport of flights table with largest value in the results of step 1']", "feedback": "in step 1, you should use source airport instead of destination airport and also from step 2, i want airport code and airports table.", "context": "What is the airport code of the airport with the most flights? || select destairport from flights group by destairport order by count ( * ) desc limit 1 || flight_2 | airports : airportcode | flights : sourceairport || in step 1, you should use source airport instead of destination airport and also from step 2, i want airport code and airports table.", "label": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) desc limit 1" }, { "prediction": "concert_singer | select singer.name, count ( * ) from singer join singer_in_concert on singer.song_id = singer_in_concert.song_id group by singer.song_id", "gold_parse": "SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id", "question": "What are the names of the singers and number of concerts for each person?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Name , Count ( * ) FROM singer GROUP BY Name", "predicted_parse_explanation": "['find each value of Name in singer table along with the number of the corresponding rows to each value']", "feedback": "Make sure to find number of similar rows for all singer in concert's singer id.", "context": "What are the names of the singers and number of concerts for each person? || select name, count ( * ) from singer group by name || concert_singer | singer : name, singer_id | singer_in_concert : singer_id || Make sure to find number of similar rows for all singer in concert's singer id.", "label": "concert_singer | select singer.name, count ( * ) from singer_in_concert join singer on singer_in_concert.singer_id = singer.singer_id group by singer.singer_id" }, { "prediction": "flight_2 | select count ( * ) from airports join flights on airports.city = flights.sourceairport and flights.flightno = flights.flightno where airports.city = 'Aberdeen' and airports.airportname = 'Ashley'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"", "question": "How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE AirportName = \"Ashley\" AND City = \"Aberdeen\"", "predicted_parse_explanation": "['find the number of rows in airports table whose AirportName equals Ashley and City equals Aberdeen']", "feedback": "airports is to changed with flights and find source airport for Ashley and destination airport for Aberdeen .", "context": "How many flights depart from City 'Aberdeen' and have destination City 'Ashley'? || select count ( * ) from airports where airportname = 'Ashley' and city = 'Aberdeen' || flight_2 | airports : city ( \"Aberdeen\" ), airportname ( \"Ashley\" ) | flights : sourceairport, flightno || airports is to changed with flights and find source airport for Ashley and destination airport for Aberdeen.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airports on flights.sourceairport = airports.airportcode where airports.city = 'Ashley' and airports.city = 'Aberdeen'" }, { "prediction": "world_1 | select count ( distinct countrycode ) from countrylanguage where language = 'English' intersect select countrycode from countrylanguage where language = 'Dutch'", "gold_parse": "SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\")", "question": "What is the number of nations that use English and Dutch?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM city", "predicted_parse_explanation": "['find the number of rows in city table']", "feedback": "I want the country table , Search for the language of countrylanguage with English and dutch.", "context": "What is the number of nations that use English and Dutch? || select count ( * ) from city || world_1 | countrylanguage : countrycode, language ( \"Dutch\" ) || I want the country table, Search for the language of countrylanguage with English and dutch.", "label": "world_1 | select count ( * ) from ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' )" }, { "prediction": "car_1 | select car_makers.maker, model_list.model from car_makers join model_list on car_makers.id = model_list.maker", "gold_parse": "SELECT Maker , Model FROM MODEL_LIST", "question": "What are all the makers and models?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Maker FROM car_makers", "predicted_parse_explanation": "['find the Maker of car_makers table']", "feedback": "Additionally, equivalent model of model list table.", "context": "What are all the makers and models? || select maker from car_makers || car_1 | car_makers : maker, id | model_list : model, maker || Additionally, equivalent model of model list table.", "label": "car_1 | select maker, model from model_list" }, { "prediction": "student_transcripts_tracking | select students.first_name, students.middle_name, students.last_name, student_enrolment.student_id from student_enrolment join students on student_enrolment.student_id = students.student_id join students on student_enrolment.degree_program_id = students.degree_program_id group by students.student_id having count ( * ) = 2", "gold_parse": "SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2", "question": "Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T2.student_id HAVING Count ( * ) = 2", "predicted_parse_explanation": "['Step 1: For each row in Students table, find the corresponding rows in Student_Enrolment table', \"Step 2: find the number of rows of each value of Student_Enrolment's student_id in the results of step 1\", 'Step 3: find first_name, middle_name, last_name in the results of step 1 whose corresponding value in step 2 is equals 2']", "feedback": "I want id of student.", "context": "Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id. || select students.first_name, students.middle_name, students.last_name from students join student_enrolment on students.student_id = student_enrolment.student_id group by student_enrolment.student_id having count ( * ) = 2 || student_transcripts_tracking | students : first_name, middle_name, last_name, student_id | student_enrolment : student_id, degree_program_id || I want id of student.", "label": "student_transcripts_tracking | select students.first_name, students.middle_name, students.last_name, students.student_id from students join student_enrolment on students.student_id = student_enrolment.student_id group by students.student_id having count ( * ) = 2" }, { "prediction": "employee_hire_evaluation | select shop.name, count ( * ) from shop join hiring on shop.shop_id = hiring.shop_id join employee_hire_evaluation on hiring.employee_id = employee_hire_evaluation group by shop.name", "gold_parse": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name", "question": "For each shop, return the number of employees working there and the name of the shop.", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , T1.Name FROM shop AS T1 JOIN hiring AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T2.Shop_ID", "predicted_parse_explanation": "['Step 1: For each row in shop table, find the corresponding rows in hiring table', \"Step 2: find each value of hiring's Shop_ID in the results of step 1 along with the number of the corresponding rows to each value\"]", "feedback": "In step 2 also find name .", "context": "For each shop, return the number of employees working there and the name of the shop. || select count ( * ), shop.name from shop join hiring on shop.shop_id = hiring.shop_id group by hiring.shop_id || employee_hire_evaluation | shop : name, shop_id | hiring : shop_id, employee_id || In step 2 also find name.", "label": "employee_hire_evaluation | select count ( * ), shop.name from hiring join shop on hiring.shop_id = shop.shop_id group by shop.name" }, { "prediction": "world_1 | select name from country where indepyear > 1950", "gold_parse": "SELECT Name FROM country WHERE IndepYear > 1950", "question": "Give the names of the nations that were founded after 1950.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE IndepYear > 1950", "predicted_parse_explanation": "['find the Continent of country table for which IndepYear greater than 1950']", "feedback": "Swap continent with name name .", "context": "Give the names of the nations that were founded after 1950. || select continent from country where indepyear > 1950 || world_1 | country : name, indepyear ( 1950 ) || Swap continent with name name.", "label": "world_1 | select name from country where indepyear > 1950" }, { "prediction": "orchestra | select orchestra.year_of_founded from performance join orchestra on performance.orchestral_id = orchestra.orchestral_id group by orchestra.year_of_founded having count ( * ) > 1", "gold_parse": "SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1", "question": "What are years of founding for orchestras that have had more than a single performance?", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT Year_of_Founded FROM orchestra GROUP BY Year_of_Founded HAVING Count ( * ) > 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Year_of_Founded in orchestra table', 'Step 2: find Year_of_Founded in orchestra table whose corresponding value in step 1 is greater than 1']", "feedback": "In step 1 , you need to find Id of orchestra from table of performance.", "context": "What are years of founding for orchestras that have had more than a single performance? || select year_of_founded from orchestra group by year_of_founded having count ( * ) > 1 || orchestra | orchestra : year_of_founded, orchestra_id | performance : orchestra_id || In step 1, you need to find Id of orchestra from table of performance.", "label": "orchestra | select year_of_founded from orchestra join performance on orchestra.orchestra_id = performance.orchestra_id group by performance.orchestra_id having count ( * ) > 1" }, { "prediction": "real_estate_properties | select count ( * ) from other_available_features", "gold_parse": "SELECT count(*) FROM Other_Available_Features", "question": "How many available features are there in total?", "db_id": "real_estate_properties", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Feature_Types", "Ref_Property_Types", "Other_Available_Features", "Properties", "Other_Property_Features" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4 ], "column_name": [ "*", "feature_type_code", "feature_type_name", "property_type_code", "property_type_description", "feature_id", "feature_type_code", "feature_name", "feature_description", "property_id", "property_type_code", "date_on_market", "date_sold", "property_name", "property_address", "room_count", "vendor_requested_price", "buyer_offered_price", "agreed_selling_price", "apt_feature_1", "apt_feature_2", "apt_feature_3", "fld_feature_1", "fld_feature_2", "fld_feature_3", "hse_feature_1", "hse_feature_2", "hse_feature_3", "oth_feature_1", "oth_feature_2", "oth_feature_3", "shp_feature_1", "shp_feature_2", "shp_feature_3", "other_property_details", "property_id", "feature_id", "property_feature_description" ] }, "db_foreign_keys": { "column_id": [ 6, 10, 35, 36 ], "other_column_id": [ 1, 3, 9, 5 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Feature_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Feature_Types table']", "feedback": "You need to use feature types in place of feature.", "context": "How many available features are there in total? || select count ( * ) from ref_feature_types || real_estate_properties | other_available_features : || You need to use feature types in place of feature.", "label": "real_estate_properties | select count ( * ) from other_available_features" }, { "prediction": "tvshow | select id from tv_channel except select channel from cartoon where directed_by = 'Ben Jones'", "gold_parse": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'", "question": "find the id of tv channels that do not play any cartoon directed by Ben Jones.", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Content FROM TV_Channel AS T1 EXCEPT SELECT T1.Content FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: find the Content of TV_Channel table', 'Step 2: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 3: find Content of the results of step 2 whose Written_by equals Ben Jones', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "Change content with id In step 1 and content , written by with Cartoon's id , directed by In step 3.", "context": "find the id of tv channels that do not play any cartoon directed by Ben Jones. || select tv_channel.content from tv_channel except select tv_channel.content from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Ben Jones' || tvshow | tv_channel : id | cartoon : channel, directed_by ( \"Ben Jones\" ) || Change content with id In step 1 and content, written by with Cartoon's id, directed by In step 3.", "label": "tvshow | select id from tv_channel except select channel from cartoon where directed_by = 'Ben Jones'" }, { "prediction": "student_transcripts_tracking | select semester_id from student_enrolment where degree_program_id = 'Master' intersect select semester_id from student_enrolment where degree_program_id = 'Bachelor'", "gold_parse": "SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'", "question": "What is the id of the semester that had both Masters and Bachelors students enrolled?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T2.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id WHERE T1.semester_name = \"Master\" INTERSECT SELECT T2.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id WHERE T1.semester_name = \"Bachelor\"", "predicted_parse_explanation": "['Step 1: For each row in Semesters table, find the corresponding rows in Student_Enrolment table', \"Step 2: find Student_Enrolment's semester_id of the results of step 1 whose semester_name equals Master\", \"Step 3: find Student_Enrolment's semester_id of the results of step 1 whose semester_name equals Bachelor\", 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "In step 1, you should use the degree program and in step 2 and 3 you should use the degree's summary name.", "context": "What is the id of the semester that had both Masters and Bachelors students enrolled? || select student_enrolment.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id where semesters.semester_name = 'Master' intersect select student_enrolment.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id where semesters.semester_name = 'Bachelor' || student_transcripts_tracking | student_enrolment : semester_id, degree_program_id ( \"Bachelor\" ) || In step 1, you should use the degree program and in step 2 and 3 you should use the degree's summary name.", "label": "student_transcripts_tracking | select distinct student_enrolment.semester_id from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id where degree_summary_name = 'Master' intersect select distinct student_enrolment.semester_id from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id where degree_summary_name = 'Bachelor'" }, { "prediction": "concert_singer | select singer.name, count ( * ) from singer join singer_in_concert on singer.song_id = singer_in_concert.song_id group by singer.name", "gold_parse": "SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id", "question": "What are the names of the singers and number of concerts for each person?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Name , Count ( * ) FROM singer GROUP BY Name", "predicted_parse_explanation": "['find each value of Name in singer table along with the number of the corresponding rows to each value']", "feedback": "Ensure to find number of the corresponding rows to each value of singer in concert's singer id .", "context": "What are the names of the singers and number of concerts for each person? || select name, count ( * ) from singer group by name || concert_singer | singer : name, singer_id | singer_in_concert : singer_id || Ensure to find number of the corresponding rows to each value of singer in concert's singer id.", "label": "concert_singer | select singer.name, count ( * ) from singer_in_concert join singer on singer_in_concert.singer_id = singer.singer_id group by singer.singer_id" }, { "prediction": "world_1 | select name from country where continent = 'Europe' and population > 80000", "gold_parse": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"", "question": "What are the names of the countries that are in the continent of Europe and have a population of 80000?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country WHERE Continent = \"Europe\" INTERSECT SELECT Name FROM country WHERE Population > 103000", "predicted_parse_explanation": "['Step 1: find the Name of country table for which Continent equals Europe', 'Step 2: find the Name of country table for which Population greater than 103000', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Need to find population equals 80000 not population greater than 103000.", "context": "What are the names of the countries that are in the continent of Europe and have a population of 80000? || select name from country where continent = 'Europe' intersect select name from country where population > 103000 || world_1 | country : name, continent ( \"Europe\" ), population ( 80000 ) || Need to find population equals 80000 not population greater than 103000.", "label": "world_1 | select name from country where continent = 'Europe' and population = '80000'" }, { "prediction": "world_1 | select count ( * ) from country where population not in ( select countrycode from countrylanguage where language = 'english' )", "gold_parse": "SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\")", "question": "How many people live in countries that do not speak English?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Population FROM country AS T1 WHERE T1.Continent NOT IN ( SELECT T2.CountryCode FROM countrylanguage AS T2 WHERE T2.Language = \"English\" )", "predicted_parse_explanation": "['Step 1: find the CountryCode of countrylanguage table for which Language equals English', 'Step 2: find the Population of country table whose Continent not one of the results of step 1']", "feedback": "give me the total of population having language other than english.", "context": "How many people live in countries that do not speak English? || select country.population from country where country.continent not in ( select countrylanguage.countrycode from countrylanguage where countrylanguage.language = 'English' ) || world_1 | country : population, countrycode | countrylanguage : countrycode, language ( \"english\" ) || give me the total of population having language other than english.", "label": "world_1 | select sum ( population ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' )" }, { "prediction": "pets_1 | select student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where pets.pettype = 'Cat' and has_pet.stuid = 3", "gold_parse": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'", "question": "Find the last name of the student who has a cat that is age 3.", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT LName FROM Student WHERE Age = 3", "predicted_parse_explanation": "['find the LName of Student table for which Age equals 3']", "feedback": "Replace age with pet age .", "context": "Find the last name of the student who has a cat that is age 3. || select lname from student where age = 3 || pets_1 | student : lname, stuid, age ( 3 ) | has_pet : stuid, petid | pets : petid, pettype ( \"Cat\" ) || Replace age with pet age.", "label": "pets_1 | select student.lname from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pet_age = 3 and pets.pettype = 'cat'" }, { "prediction": "network_1 | select distinct grade from highschooler", "gold_parse": "SELECT grade FROM Highschooler", "question": "Show all the grades of the high schoolers.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT DISTINCT grade FROM Highschooler WHERE grade = 9", "predicted_parse_explanation": "['find without repetition the grade of Highschooler table for which grade equals 9']", "feedback": "You should delete the phrase \"for which grade equals 9 \".", "context": "Show all the grades of the high schoolers. || select distinct grade from highschooler where grade = 9 || network_1 | highschooler : grade || You should delete the phrase \"for which grade equals 9 \".", "label": "network_1 | select grade from highschooler" }, { "prediction": "car_1 | select car_makers.fullname, car_makers.id from car_makers join model_list on car_makers.id = model_list.maker group by model_list.maker having count ( * ) > 3", "gold_parse": "SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3", "question": "What are the names and ids of all makers with more than 3 models?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T1.FullName , T2.ModelId FROM car_makers AS T1 JOIN model_list AS T2 ON T1.Id = T2.Maker GROUP BY T2.ModelId HAVING Count ( * ) > 3", "predicted_parse_explanation": "['Step 1: For each row in car_makers table, find the corresponding rows in model_list table', 'Step 2: find the number of rows of each value of ModelId in the results of step 1', 'Step 3: find FullName, ModelId in the results of step 1 whose corresponding value in step 2 is greater than 3']", "feedback": "model id is wrong in step 3 , find car makers's id in place of that .", "context": "What are the names and ids of all makers with more than 3 models? || select car_makers.fullname, model_list.modelid from car_makers join model_list on car_makers.id = model_list.maker group by model_list.modelid having count ( * ) > 3 || car_1 | car_makers : fullname, id | model_list : maker || model id is wrong in step 3, find car makers's id in place of that.", "label": "car_1 | select car_makers.fullname, car_makers.id from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id having count ( * ) > 3" }, { "prediction": "dog_kennels | select owners.first_name, owners.last_name, dogs.size_code from owners join dogs on owners.owner_id = dogs.owner_id", "gold_parse": "SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "question": "List each owner's first name, last name, and the size of his for her dog.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT first_name , last_name , owner_id FROM Owners", "predicted_parse_explanation": "['find the first_name, last_name, owner_id of Owners table']", "feedback": "I want similar dogs size code.", "context": "List each owner's first name, last name, and the size of his for her dog. || select first_name, last_name, owner_id from owners || dog_kennels | owners : first_name, last_name, owner_id | dogs : size_code, owner_id || I want similar dogs size code.", "label": "dog_kennels | select owners.first_name, owners.last_name, dogs.size_code from owners join dogs on owners.owner_id = dogs.owner_id" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from documents", "gold_parse": "SELECT count(*) FROM Documents", "question": "Count the number of documents.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "You need to utilize documents table.", "context": "Count the number of documents. || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | documents : || You need to utilize documents table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from documents" }, { "prediction": "concert_singer | select name, capacity from stadium order by avg ( average ) desc limit 1", "gold_parse": "SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1", "question": "What is the name and capacity for the stadium with the highest average attendance?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Name , Capacity FROM stadium GROUP BY Stadium_ID ORDER BY Avg ( Average ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the average Average of each value of Stadium_ID in stadium table', 'Step 2: find Name, Capacity of stadium table with largest value in the results of step 1']", "feedback": "Don't search for the mean of all mean.", "context": "What is the name and capacity for the stadium with the highest average attendance? || select name, capacity from stadium group by stadium_id order by avg ( average ) desc limit 1 || concert_singer | stadium : name, capacity, average || Don't search for the mean of all mean.", "label": "concert_singer | select name, capacity from stadium order by average desc limit 1" }, { "prediction": "flight_2 | select count ( * ) from flights", "gold_parse": "SELECT count(*) FROM FLIGHTS", "question": "Return the number of flights.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines", "predicted_parse_explanation": "['find the number of rows in airlines table']", "feedback": "You should use flights rather than airlines.", "context": "Return the number of flights. || select count ( * ) from airlines || flight_2 | flights : || You should use flights rather than airlines.", "label": "flight_2 | select count ( * ) from flights" }, { "prediction": "tvshow | select id from tv_channel where country > 2", "gold_parse": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2", "question": "find id of the tv channels that from the countries where have more than two tv channels.", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Content FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel GROUP BY T2.Channel HAVING Count ( * ) > 2", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in TV_series table', 'Step 2: find the number of rows of each value of Channel in the results of step 1', 'Step 3: find Content in the results of step 1 whose corresponding value in step 2 is greater than 2']", "feedback": "In step 2 Substitute channel with country , In step 3 Substitute content with id .", "context": "find id of the tv channels that from the countries where have more than two tv channels. || select tv_channel.content from tv_channel join tv_series on tv_channel.id = tv_series.channel group by tv_series.channel having count ( * ) > 2 || tvshow | tv_channel : id, country || In step 2 Substitute channel with country, In step 3 Substitute content with id.", "label": "tvshow | select id from tv_channel group by country having count ( * ) > 2" }, { "prediction": "car_1 | select distinct model_list.model from car_makers join models_data on car_makers.id = models_data.model where car_makers.maker = 'General Motors' or cars_data.weight > 3500", "gold_parse": "SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500", "question": "What are the different models created by either the car maker General Motors or weighed more than 3500?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT DISTINCT T1.Model FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T3.Horsepower > 3500 OR T3.Horsepower = \"General Motors\"", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find without repetition model_list's Model of the results of step 1 whose Horsepower greater than General Motors or Horsepower equals 3500\"]", "feedback": "In step 1 replace car names table car makers , Step 2 find whose weight beyond 3500 and cylinders equals General Motors .", "context": "What are the different models created by either the car maker General Motors or weighed more than 3500? || select distinct model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id where cars_data.horsepower > 3500 or cars_data.horsepower = 'General Motors' || car_1 | model_list : model, maker | car_makers : id, maker ( \"General Motors\" ) | cars_data : model, weight ( 3500 ) || In step 1 replace car names table car makers, Step 2 find whose weight beyond 3500 and cylinders equals General Motors.", "label": "car_1 | select distinct model_list.model from car_names join model_list on car_names.model = model_list.model join car_makers on model_list.maker = car_makers.id join cars_data on car_names.makeid = cars_data.id where car_makers.fullname = 'General Motors' or cars_data.weight > 3500" }, { "prediction": "tvshow | select episode, rating from tv_series group by episode order by count ( * ) desc limit 3", "gold_parse": "SELECT Episode , Rating FROM TV_series ORDER BY Rating DESC LIMIT 3", "question": "What are 3 most highly rated episodes in the TV series table and what were those ratings?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Rating , T1.Rating FROM TV_series AS T1 GROUP BY T1.Rating ORDER BY Count ( * ) Desc LIMIT 1 INTERSECT SELECT T1.Rating FROM TV_Channel AS T2 JOIN TV_series AS T1 ON T2.id = T1.Channel GROUP BY T2.Hight_definition_TV ORDER BY Count ( * ) Desc LIMIT 3", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Rating in TV_series table', 'Step 2: find Rating, Rating of TV_series table ordered descending by the results of step 1', 'Step 3: For each row in TV_Channel table, find the corresponding rows in TV_series table', 'Step 4: find the number of rows of each value of Hight_definition_TV in the results of step 3', 'Step 5: find Rating of step 3 results ordered descending by the results of step 4', 'Step 6: only keep the first row of the results of step 5', 'Step 7: show the rows that are in both the results of step 2 and the results of step 6', 'Step 8: only show the first 3 rows of the results']", "feedback": "Show only first 3 episode and rating of tv series table ordered descending by rating .", "context": "What are 3 most highly rated episodes in the TV series table and what were those ratings? || select tv_series.rating, tv_series.rating from tv_series group by tv_series.rating order by count ( * ) desc limit 1 intersect select tv_series.rating from tv_channel join tv_series on tv_channel.id = tv_series.channel group by tv_channel.hight_definition_tv order by count ( * ) desc limit 3 || tvshow | tv_series : episode, rating || Show only first 3 episode and rating of tv series table ordered descending by rating.", "label": "tvshow | select episode, rating from tv_series order by rating desc limit 3" }, { "prediction": "world_1 | select language from countrylanguage group by language order by count ( * ) desc limit 1", "gold_parse": "SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1", "question": "Which language is spoken by the largest number of countries?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Code2 FROM country ORDER BY Continent Desc LIMIT 1", "predicted_parse_explanation": "['find the Code2 of country table with largest value of Continent']", "feedback": "You have to search in countrylanguage table for total number of rows of language.", "context": "Which language is spoken by the largest number of countries? || select code2 from country order by continent desc limit 1 || world_1 | countrylanguage : language || You have to search in countrylanguage table for total number of rows of language.", "label": "world_1 | select language from countrylanguage group by language order by count ( * ) desc limit 1" }, { "prediction": "tvshow | select air_date from tv_series where episode = 'A Love of a Lifetime'", "gold_parse": "SELECT Air_Date FROM TV_series WHERE Episode = \"A Love of a Lifetime\"", "question": "When did the episode \"A Love of a Lifetime\" air?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T2.Channel = T1.id JOIN Cartoon AS T3 ON T1.id = T3.Channel WHERE T3.Title = \"A Love of a Lifetime\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find corresponding rows in TV_series table and in Cartoon table', 'Step 2: find Episode of the results of step 1 whose Title equals A Love of a Lifetime']", "feedback": "episode and title can be replaced by air date and episode respectively .", "context": "When did the episode \"A Love of a Lifetime\" air? || select tv_series.episode from tv_channel join tv_series on tv_series.channel = tv_channel.id join cartoon on tv_channel.id = cartoon.channel where cartoon.title = 'A Love of a Lifetime' || tvshow | tv_series : air_date, episode ( \"A Love of a Lifetime\" ) || episode and title can be replaced by air date and episode respectively.", "label": "tvshow | select air_date from tv_series where episode = 'A Love of a Lifetime'" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "question": "Return the name of the high school student with the most friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler GROUP BY grade ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of grade in Highschooler table', 'Step 2: find name of Highschooler table with largest value in the results of step 1']", "feedback": "Exchange grade in high schooler table with student id in friend table in step 1.", "context": "Return the name of the high school student with the most friends. || select name from highschooler group by grade order by count ( * ) desc limit 1 || network_1 | highschooler : name, id | friend : student_id || Exchange grade in high schooler table with student id in friend table in step 1.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id order by count ( * ) desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select version_number, template_type_code from templates where template_id > 5", "gold_parse": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5", "question": "Return the version numbers and template type codes of templates with a version number greater than 5.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T1.Version_Number , T1.Template_Type_Code FROM Templates AS T1 JOIN Documents AS T2 ON T1.Template_ID = T2.Template_ID GROUP BY T2.Template_ID HAVING Count ( * ) > 5", "predicted_parse_explanation": "['Step 1: For each row in Templates table, find the corresponding rows in Documents table', \"Step 2: find the number of rows of each value of Documents's Template_ID in the results of step 1\", 'Step 3: find Version_Number, Template_Type_Code in the results of step 1 whose corresponding value in step 2 is greater than 5']", "feedback": "You need to just search for the version number in step 2.", "context": "Return the version numbers and template type codes of templates with a version number greater than 5. || select templates.version_number, templates.template_type_code from templates join documents on templates.template_id = documents.template_id group by documents.template_id having count ( * ) > 5 || cre_Doc_Template_Mgt | templates : version_number, template_type_code, template_id ( 5 ) || You need to just search for the version number in step 2.", "label": "cre_Doc_Template_Mgt | select version_number, template_type_code from templates where version_number > 5" }, { "prediction": "world_1 | select count ( * ) from country where governmentform = 'Republic'", "gold_parse": "SELECT count(*) FROM country WHERE GovernmentForm = \"Republic\"", "question": "How many countries have governments that are republics?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Continent ) FROM country", "predicted_parse_explanation": "['find the number of different Continent in country table']", "feedback": "You have search for the rows count of country table whose government form equivalent to republics.", "context": "How many countries have governments that are republics? || select count ( distinct continent ) from country || world_1 | country : governmentform ( \"Republic\" ) || You have search for the rows count of country table whose government form equivalent to republics.", "label": "world_1 | select count ( * ) from country where governmentform = 'Republic'" }, { "prediction": "tvshow | select title, directed_by from cartoon order by original_air_date asc", "gold_parse": "SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date", "question": "list all cartoon titles and their directors ordered by their air date", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Title , Directed_by FROM Cartoon ORDER BY Title Asc", "predicted_parse_explanation": "['find the Title, Directed_by of Cartoon table ordered ascending by Title']", "feedback": "Use original air date in place of second title .", "context": "list all cartoon titles and their directors ordered by their air date || select title, directed_by from cartoon order by title asc || tvshow | cartoon : title, directed_by, original_air_date || Use original air date in place of second title.", "label": "tvshow | select title, directed_by from cartoon order by original_air_date asc" }, { "prediction": "wta_1 | select players.first_name, players.country_code, players.birth_date from players join matches on players.player_id = matches.winner_rank group by players.player_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1", "question": "Find the first name, country code and birth date of the winner who has the highest rank points in all matches.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.country_code , T2.loser_age FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id ORDER BY T2.winner_rank Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find first_name, country_code, loser_age of the results of step 1 with largest value of winner_rank']", "feedback": "I want date of birth and rank of winner points.", "context": "Find the first name, country code and birth date of the winner who has the highest rank points in all matches. || select players.first_name, players.country_code, matches.loser_age from players join matches on players.player_id = matches.loser_id order by matches.winner_rank desc limit 1 || wta_1 | players : first_name, country_code, birth_date, player_id | matches : winner_rank || I want date of birth and rank of winner points.", "label": "wta_1 | select players.first_name, players.country_code, players.birth_date from players join matches on players.player_id = matches.winner_id order by matches.winner_rank_points desc limit 1" }, { "prediction": "tvshow | select count ( distinct series_name ), count ( distinct content ) from tv_channel", "gold_parse": "SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel", "question": "How many different series and contents are listed in the TV Channel table?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Episode ) , Count ( * ) FROM TV_series", "predicted_parse_explanation": "['find the number of different Episode and the number of rows in TV_series table']", "feedback": "Make sure to find distinct series name and distinct content in tv channel table .", "context": "How many different series and contents are listed in the TV Channel table? || select count ( distinct episode ), count ( * ) from tv_series || tvshow | tv_channel : series_name, content || Make sure to find distinct series name and distinct content in tv channel table.", "label": "tvshow | select count ( distinct series_name ), count ( distinct content ) from tv_channel" }, { "prediction": "car_1 | select count ( distinct model_list.modelid ) from model_list join car_makers on model_list.modelid = car_makers.id where car_makers.fulname = 'American Motor Company'", "gold_parse": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company'", "question": "How many car models were produced by the maker with full name American Motor Company?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM car_makers WHERE FullName = \"American Motor Company\" AND FullName = \"American Motor Company\"", "predicted_parse_explanation": "['find the number of rows in car_makers table whose FullName equals American Motor Company and FullName equals American Motor Company']", "feedback": "Change car makers table with model list table and remove last full name equals American Motor Company .", "context": "How many car models were produced by the maker with full name American Motor Company? || select count ( * ) from car_makers where fullname = 'American Motor Company' and fullname = 'American Motor Company' || car_1 | model_list : modelid, maker | car_makers : id, fullname ( \"American Motor Company\" ) || Change car makers table with model list table and remove last full name equals American Motor Company.", "label": "car_1 | select count ( * ) from car_makers join model_list on car_makers.id = model_list.maker where car_makers.fullname = 'American Motor Company'" }, { "prediction": "student_transcripts_tracking | select semester_name from semesters where semester_id not in ( select semester_id from student_enrolment )", "gold_parse": "SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )", "question": "Which semesters do not have any student enrolled? List the semester name.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T1.semester_id FROM Semesters AS T1 WHERE T1.semester_id NOT IN ( SELECT T2.semester_id FROM Student_Enrolment AS T2 )", "predicted_parse_explanation": "['Step 1: find the semester_id of Student_Enrolment table', \"Step 2: find the Semesters's semester_id of Semesters table whose Semesters's semester_id not one of the results of step 1\"]", "feedback": "Find semester name of semesters table whose semester id isn't present in student enrolment table .", "context": "Which semesters do not have any student enrolled? List the semester name. || select semesters.semester_id from semesters where semesters.semester_id not in ( select student_enrolment.semester_id from student_enrolment ) || student_transcripts_tracking | semesters : semester_name, semester_id | student_enrolment : semester_id || Find semester name of semesters table whose semester id isn't present in student enrolment table.", "label": "student_transcripts_tracking | select semester_name from semesters where semester_id not in ( select semester_id from student_enrolment )" }, { "prediction": "flight_2 | select count ( * ) from airlines join flights on airlines.uid = flights.airline where airlines.airline = 'United Airlines' and flights.sourceairport = 'AHD'", "gold_parse": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.SourceAirport = \"AHD\"", "question": "Return the number of United Airlines flights leaving from AHD Airport.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"United Airlines\" AND T1.Airline = \"AHD\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in airports table', \"Step 2: find the number of rows in the results of step 1 whose airports's Country equals United Airlines and Airline equals AHD\"]", "feedback": "Add flights table in step 1 , change airports's country with airlines's airline and airline with source airport .", "context": "Return the number of United Airlines flights leaving from AHD Airport. || select count ( * ) from airlines join airports where airports.country = 'United Airlines' and airlines.airline = 'AHD' || flight_2 | airlines : uid, airline ( \"United Airlines\" ) | flights : airline, sourceairport ( \"AHD\" ) || Add flights table in step 1, change airports's country with airlines's airline and airline with source airport.", "label": "flight_2 | select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.sourceairport = 'AHD'" }, { "prediction": "pets_1 | select student.fname from student join has_pet on student.stuid = has_pet.stuid except select student.fname from student join pets on has_pet.petid = pets.petid where pets.pettype = 'Dog' except select student.fname from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where pets.pettype = 'Cat'", "gold_parse": "SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "question": "What is the first name of every student who has a dog but does not have a cat?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT T1.Fname FROM Student AS T1 WHERE T1.StuID IN ( SELECT T2.StuID FROM Has_Pet AS T2 ) EXCEPT SELECT T1.Fname FROM Student AS T1", "predicted_parse_explanation": "['Step 1: find the StuID of Has_Pet table', \"Step 2: find the Fname of Student table whose Student's StuID one of the results of step 1\", 'Step 3: find the Fname of Student table', 'Step 4: show the rows that are in the results of step 2 but not in the results of step 3']", "feedback": "Ensure to find whose Pet's pet type equals dog but does not equals to cat .", "context": "What is the first name of every student who has a dog but does not have a cat? || select student.fname from student where student.stuid in ( select has_pet.stuid from has_pet ) except select student.fname from student as student || pets_1 | student : fname, stuid | has_pet : stuid, petid | pets : petid, pettype ( \"Cat\" ) || Ensure to find whose Pet's pet type equals dog but does not equals to cat.", "label": "pets_1 | select student.fname, student.age from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'dog' and student.stuid not in ( select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' )" }, { "prediction": "wta_1 | select loser_rank from matches order by loser_rank desc limit 1", "gold_parse": "SELECT min(loser_rank) FROM matches", "question": "Find the highest rank of losers in all matches.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT loser_rank FROM matches", "predicted_parse_explanation": "['find the loser_rank of matches table']", "feedback": "Need to find largest loser rank .", "context": "Find the highest rank of losers in all matches. || select loser_rank from matches || wta_1 | matches : loser_rank || Need to find largest loser rank.", "label": "wta_1 | select min ( loser_rank ) from matches" }, { "prediction": "world_1 | select country.continence from country join countrylanguage on country.language = countrylanguage.language group by country.continence order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1", "question": "Which continent has the most diverse languages?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country GROUP BY Continent ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Continent in country table', 'Step 2: find Continent of country table with largest value in the results of step 1']", "feedback": "Need to find continent with largest number of distinct languages spoken in it .", "context": "Which continent has the most diverse languages? || select continent from country group by continent order by count ( * ) desc limit 1 || world_1 | country : continent, language | countrylanguage : language || Need to find continent with largest number of distinct languages spoken in it.", "label": "world_1 | select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode group by country.continent order by count ( * ) desc limit 1" }, { "prediction": "pets_1 | select major, age from student where stuid not in ( select stuid from has_pet join pets on has_pet.petid = pets.petid where pets.pettype = 'cat' )", "gold_parse": "SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "question": "What major is every student who does not own a cat as a pet, and also how old are they?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT T1.Major , T1.Age FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID JOIN Pets AS T3 ON T2.PetID = T3.PetID WHERE T3.weight < = \"cat\"", "predicted_parse_explanation": "['Step 1: For each row in Has_Pet table, find corresponding rows in Student table and in Pets table', 'Step 2: find Major, Age of the results of step 1 whose weight less than or equals cat']", "feedback": "Remove condition and mention that student does not have pet whose pet type equals cat .", "context": "What major is every student who does not own a cat as a pet, and also how old are they? || select student.major, student.age from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where pets.weight < = 'cat' || pets_1 | student : major, age, stuid | has_pet : stuid, petid | pets : petid, pettype ( \"cat\" ) || Remove condition and mention that student does not have pet whose pet type equals cat.", "label": "pets_1 | select major, age from student where stuid not in ( select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat' )" }, { "prediction": "cre_Doc_Template_Mgt | select document_id from paragraphs group by document_id having count ( * ) >= 2", "gold_parse": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", "question": "List all document ids with at least two paragraphs.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_ID FROM Documents GROUP BY Template_ID HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Template_ID in Documents table', 'Step 2: find Template_ID in Documents table whose corresponding value in step 1 is greater than or equals 2']", "feedback": "Need to use id of document in step 1 and 2 and paragraphs table in place of documents table in step 1.", "context": "List all document ids with at least two paragraphs. || select template_id from documents group by template_id having count ( * ) > = 2 || cre_Doc_Template_Mgt | paragraphs : document_id || Need to use id of document in step 1 and 2 and paragraphs table in place of documents table in step 1.", "label": "cre_Doc_Template_Mgt | select document_id from paragraphs group by document_id having count ( * ) >= 2" }, { "prediction": "car_1 | select car_names.model from cars_data join car_names on cars_data.id = car_names.id order by cars_data.mpg desc limit 1", "gold_parse": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1", "question": "What is the car wmodel with the highest mpg?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Edispl FROM cars_data ORDER BY Weight Desc LIMIT 1", "predicted_parse_explanation": "['find the Edispl of cars_data table with largest value of Weight']", "feedback": "Use model , car names table , mpg instead of edispl , cars data table , weight respectively .", "context": "What is the car wmodel with the highest mpg? || select edispl from cars_data order by weight desc limit 1 || car_1 | car_names : model, id | cars_data : id, mpg || Use model, car names table, mpg instead of edispl, cars data table, weight respectively.", "label": "car_1 | select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id order by cars_data.mpg desc limit 1" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by flights.airline having count ( * ) >= 10", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) > 10", "question": "Which airlines have at least 10 flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines GROUP BY Airline HAVING Count ( * ) > = 10", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Airline in airlines table', 'Step 2: find Airline in airlines table whose corresponding value in step 1 is greater than or equals 10']", "feedback": "In step 1 , there should be flights table , not airlines table .", "context": "Which airlines have at least 10 flights? || select airline from airlines group by airline having count ( * ) > = 10 || flight_2 | airlines : airline, uid | flights : airline || In step 1, there should be flights table, not airlines table.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) > 10" }, { "prediction": "world_1 | select sum ( country.lifeexpectancy ) from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language!= 'english'", "gold_parse": "SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\")", "question": "Give the mean life expectancy of countries in which English is not the official language.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Sum ( LifeExpectancy ) FROM country WHERE Name ! = \"English\"", "predicted_parse_explanation": "['find the summation of LifeExpectancy in country table whose Name not equals English']", "feedback": "Ensure that to find average of life expectancy , Change name name with language , also is official equals F .", "context": "Give the mean life expectancy of countries in which English is not the official language. || select sum ( lifeexpectancy ) from country where name! = 'English' || world_1 | country : lifeexpectancy, code | countrylanguage : countrycode, language ( \"english\" ) || Ensure that to find average of life expectancy, Change name name with language, also is official equals F.", "label": "world_1 | select avg ( lifeexpectancy ) from country where name not in ( select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' )" }, { "prediction": "wta_1 | select first_name, last_name from players where hand = 'L' order by birth_date asc", "gold_parse": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date", "question": "List the first and last name of all players who are left / L hand in the order of birth date.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT first_name , last_name FROM players WHERE first_name LIKE \"L\" ORDER BY birth_date Asc", "predicted_parse_explanation": "['find the first_name, last_name of players table for which first_name contains L ordered ascending by birth_date']", "feedback": "I want \" hand as L \".", "context": "List the first and last name of all players who are left / L hand in the order of birth date. || select first_name, last_name from players where first_name like 'L' order by birth_date asc || wta_1 | players : first_name, last_name, hand ( \"L\" ), birth_date || I want \" hand as L \".", "label": "wta_1 | select first_name, last_name from players where hand = 'L' order by birth_date asc" }, { "prediction": "world_1 | select avg ( gnp ), sum ( population ) from country where governmentform = 'US Territory'", "gold_parse": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"", "question": "What is the average GNP and total population in all nations whose government is US territory?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( GNP ) , Avg ( Population ) FROM country WHERE Continent = \"US Territory\"", "predicted_parse_explanation": "['find the average GNP and the average Population in country table whose Continent equals US Territory']", "feedback": "Mention total population rather than average population . government form equals US Territory , not continent .", "context": "What is the average GNP and total population in all nations whose government is US territory? || select avg ( gnp ), avg ( population ) from country where continent = 'US Territory' || world_1 | country : gnp, population, governmentform ( \"US Territory\" ) || Mention total population rather than average population. government form equals US Territory, not continent.", "label": "world_1 | select avg ( gnp ), sum ( population ) from country where governmentform = 'US Territory'" }, { "prediction": "cre_Doc_Template_Mgt | select documents.document_id, documents.document_name from documents join paragraphs on documents.document_id = paragraphs.document_id group by documents.document_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the document id and name with greatest number of paragraphs?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID , Document_Name FROM Documents GROUP BY Document_ID ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Document_ID in Documents table', 'Step 2: find Document_ID, Document_Name of Documents table with largest value in the results of step 1']", "feedback": "In step 1, be certain to use the paragraph's table in place of document's table.", "context": "What is the document id and name with greatest number of paragraphs? || select document_id, document_name from documents group by document_id order by count ( * ) desc limit 1 || cre_Doc_Template_Mgt | documents : document_id, document_name | paragraphs : document_id || In step 1, be certain to use the paragraph's table in place of document's table.", "label": "cre_Doc_Template_Mgt | select paragraphs.document_id, documents.document_name from paragraphs join documents on paragraphs.document_id = documents.document_id group by paragraphs.document_id order by count ( * ) desc limit 1" }, { "prediction": "pets_1 | select count ( * ) from pets where weight > 10", "gold_parse": "SELECT count(*) FROM pets WHERE weight > 10", "question": "Find the number of pets whose weight is heavier than 10.", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Pets WHERE pet_age > 10", "predicted_parse_explanation": "['find the number of rows in Pets table whose pet_age greater than 10']", "feedback": "weight should be substituted in place of pet age.", "context": "Find the number of pets whose weight is heavier than 10. || select count ( * ) from pets where pet_age > 10 || pets_1 | pets : weight ( 10 ) || weight should be substituted in place of pet age.", "label": "pets_1 | select count ( * ) from pets where weight > 10" }, { "prediction": "world_1 | select count ( distinct governmentform ) from country where continent = 'Africa'", "gold_parse": "SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent = \"Africa\"", "question": "How many type of governments are in Africa?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM country WHERE Continent = \"Africa\"", "predicted_parse_explanation": "['find the number of rows in country table whose Continent equals Africa']", "feedback": "find the number of different government forms not the number of rows", "context": "How many type of governments are in Africa? || select count ( * ) from country where continent = 'Africa' || world_1 | country : governmentform, continent ( \"Africa\" ) || find the number of different government forms not the number of rows", "label": "world_1 | select count ( distinct governmentform ) from country where continent = 'Africa'" }, { "prediction": "flight_2 | select count ( * ) from airlines join flights on airlines.uid = flights.airline join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = \"Aberdeen\" AND T3.Airline = \"United Airlines\"", "question": "How many United Airlines flights go to City 'Aberdeen'?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE Country = \"Aberdeen\" AND City = \"United Airlines\"", "predicted_parse_explanation": "['find the number of rows in airports table whose Country equals Aberdeen and City equals United Airlines']", "feedback": "Search number of rows of flights for United airlines whose destination airline equals Aberdeen .", "context": "How many United Airlines flights go to City 'Aberdeen'? || select count ( * ) from airports where country = 'Aberdeen' and city = 'United Airlines' || flight_2 | airlines : uid | flights : airline, sourceairport | airports : airportcode, city ( \"Aberdeen\" ) || Search number of rows of flights for United airlines whose destination airline equals Aberdeen.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airlines on airlines.uid = flights.airline where airports.city = 'Aberdeen' and airlines.airline = 'United Airlines'" }, { "prediction": "wta_1 | select count ( distinct winner_id ) from matches where tourney_name = 'WTA Championships' and winner_hand = 'left'", "gold_parse": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'", "question": "How many different winners both participated in the WTA Championships and were left handed?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM players AS T1 INTERSECT SELECT T2.loser_ioc FROM matches AS T2", "predicted_parse_explanation": "['Step 1: find the number of rows in players table', 'Step 2: find the loser_ioc of matches table', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Need to find for tourney name equals WTA Championships and winner hand equals L for matches table .", "context": "How many different winners both participated in the WTA Championships and were left handed? || select count ( * ) from players intersect select matches.loser_ioc from matches as matches || wta_1 | matches : winner_id, tourney_name ( \"WTA Championships\" ), winner_hand ( \"left\" ) || Need to find for tourney name equals WTA Championships and winner hand equals L for matches table.", "label": "wta_1 | select count ( distinct winner_name ) from matches where tourney_name = 'WTA Championships' and winner_hand = 'L'" }, { "prediction": "world_1 | select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba'", "gold_parse": "SELECT COUNT(T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Aruba\"", "question": "How many languages are spoken in Aruba?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT T2.Language ) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = \"Aruba\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in countrylanguage table', 'Step 2: find the number of different Language in the results of step 1 whose Continent equals Aruba']", "feedback": "The country's name name should be Aruba , continent is wrong .", "context": "How many languages are spoken in Aruba? || select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.continent = 'Aruba' || world_1 | countrylanguage : language, countrycode | country : code, name ( \"Aruba\" ) || The country's name name should be Aruba, continent is wrong.", "label": "world_1 | select count ( countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Aruba'" }, { "prediction": "world_1 | select countrycode from country where governmentform = 'Republic' except select countrycode from countrylanguage where language = 'English'", "gold_parse": "SELECT Code FROM country WHERE GovernmentForm != \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\"", "question": "Return the codes of countries that do not speak English and do not have Republics for governments.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT T1.Code FROM country AS T1 WHERE T1.Continent = \"Republic\" EXCEPT SELECT T1.Code FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\"", "predicted_parse_explanation": "['Step 1: find the Code of country table for which Continent equals Republic', 'Step 2: For each row in country table, find the corresponding rows in countrylanguage table', 'Step 3: find Code of the results of step 2 whose Language equals English', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "In step 1, you should replace \"Continent equals Republic\" with \"government form not equals Republic\".", "context": "Return the codes of countries that do not speak English and do not have Republics for governments. || select country.code from country where country.continent = 'Republic' except select country.code from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' || world_1 | country : code, governmentform ( \"Republic\" ) | countrylanguage : countrycode, language ( \"English\" ) || In step 1, you should replace \"Continent equals Republic\" with \"government form not equals Republic\".", "label": "world_1 | select code from country where governmentform!= 'Republic' except select countrycode from countrylanguage where language = 'English'" }, { "prediction": "flight_2 | select count ( * ) from flights where sourceairport = 'APG'", "gold_parse": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"", "question": "How many flights depart from 'APG'?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines WHERE Airline = \"APG\"", "predicted_parse_explanation": "['find the number of rows in airlines table whose Airline equals APG']", "feedback": "Change airlines table and airline to flights table and source airport respectively .", "context": "How many flights depart from 'APG'? || select count ( * ) from airlines where airline = 'APG' || flight_2 | flights : sourceairport ( \"APG\" ) || Change airlines table and airline to flights table and source airport respectively.", "label": "flight_2 | select count ( * ) from flights where sourceairport = 'APG'" }, { "prediction": "tvshow | select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Ben Jones' intersect select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Michael Chang'", "gold_parse": "SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'", "question": "Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.series_name , T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Michael Chang\" AND T2.Written_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find series_name, Country of the results of step 1 whose Written_by equals Ben Jones and Written_by equals Michael Chang']", "feedback": "In step 2, in both the places you should mention directed by in place or written by.", "context": "Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang? || select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Michael Chang' and cartoon.written_by = 'Ben Jones' || tvshow | tv_channel : series_name, country, id | cartoon : channel, directed_by ( \"Michael Chang\" ) || In step 2, in both the places you should mention directed by in place or written by.", "label": "tvshow | select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Michael Chang' intersect select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Ben Jones'" }, { "prediction": "world_1 | select region, population from country where name = 'Angola'", "gold_parse": "SELECT Population , Region FROM country WHERE Name = \"Angola\"", "question": "What region does Angola belong to and what is its population?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Region , Population FROM country", "predicted_parse_explanation": "['find the Region, Population of country table']", "feedback": "For which name equals Angola .", "context": "What region does Angola belong to and what is its population? || select region, population from country || world_1 | country : region, population, name ( \"Angola\" ) || For which name equals Angola.", "label": "world_1 | select population, region from country where name = 'Angola'" }, { "prediction": "cre_Doc_Template_Mgt | select document_id from paragraphs group by document_id having count ( * ) >= 2", "gold_parse": "SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2", "question": "What are the ids of documents that have 2 or more paragraphs?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T1.Document_ID FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.Document_ID = T2.Document_ID GROUP BY T2.Document_ID HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: For each row in Documents table, find the corresponding rows in Paragraphs table', \"Step 2: find the number of rows of each value of Paragraphs's Document_ID in the results of step 1\", \"Step 3: find Documents's Document_ID in the results of step 1 whose corresponding value in step 2 is greater than or equals 2\"]", "feedback": "no repetition in output", "context": "What are the ids of documents that have 2 or more paragraphs? || select documents.document_id from documents join paragraphs on documents.document_id = paragraphs.document_id group by paragraphs.document_id having count ( * ) > = 2 || cre_Doc_Template_Mgt | paragraphs : document_id || no repetition in output", "label": "cre_Doc_Template_Mgt | select document_id from paragraphs group by document_id having count ( * ) >= 2" }, { "prediction": "network_1 | select friend.name from friend join highschooler on friend.friend_id = highschooler.id where highschooler.name = 'Kyle'", "gold_parse": "SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = \"Kyle\"", "question": "Return the names of friends of the high school student Kyle.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler WHERE grade = \"Kyle\"", "predicted_parse_explanation": "['find the name of Highschooler table for which grade equals Kyle']", "feedback": "search for name of Highschooler's having kyle as a friend and also available in friend table.", "context": "Return the names of friends of the high school student Kyle. || select name from highschooler where grade = 'Kyle' || network_1 | friend : name, friend_id | highschooler : id, name ( \"Kyle\" ) || search for name of Highschooler's having kyle as a friend and also available in friend table.", "label": "network_1 | select highschooler.name from friend join highschooler on friend.student_id = highschooler.id join highschooler on friend.friend_id = highschooler.id where highschooler.name = 'Kyle'" }, { "prediction": "concert_singer | select count ( * ) from singer", "gold_parse": "SELECT count(*) FROM singer", "question": "What is the total number of singers?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM stadium", "predicted_parse_explanation": "['find the number of rows in stadium table']", "feedback": "Use singer table instead of stadium table.", "context": "What is the total number of singers? || select count ( * ) from stadium || concert_singer | singer : || Use singer table instead of stadium table.", "label": "concert_singer | select count ( * ) from singer" }, { "prediction": "network_1 | select id from highschooler where name = 'Kyle'", "gold_parse": "SELECT ID FROM Highschooler WHERE name = \"Kyle\"", "question": "Show the ID of the high schooler named Kyle.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT ID FROM Highschooler WHERE grade = \"Kyle\"", "predicted_parse_explanation": "['find the ID of Highschooler table for which grade equals Kyle']", "feedback": "Instead of grade use name .", "context": "Show the ID of the high schooler named Kyle. || select id from highschooler where grade = 'Kyle' || network_1 | highschooler : id, name ( \"Kyle\" ) || Instead of grade use name.", "label": "network_1 | select id from highschooler where name = 'Kyle'" }, { "prediction": "tvshow | select id from tv_channel except select channel from cartoon where directed_by = 'Ben Jones'", "gold_parse": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'", "question": "What are the ids of the TV channels that do not have any cartoons directed by Ben Jones?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Content FROM TV_Channel AS T1 EXCEPT SELECT T1.Content FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: find the Content of TV_Channel table', 'Step 2: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 3: find Content of the results of step 2 whose Written_by equals Ben Jones', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "Take id in place of content and directed by in place of written by .", "context": "What are the ids of the TV channels that do not have any cartoons directed by Ben Jones? || select tv_channel.content from tv_channel except select tv_channel.content from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Ben Jones' || tvshow | tv_channel : id | cartoon : channel, directed_by ( \"Ben Jones\" ) || Take id in place of content and directed by in place of written by.", "label": "tvshow | select id from tv_channel except select channel from cartoon where directed_by = 'Ben Jones'" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"", "question": "What are airlines that have flights arriving at airport 'AHD'?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.AirportName = \"AHD\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in airports table', 'Step 2: find Airline of the results of step 1 whose AirportName equals AHD']", "feedback": "Change airports table with flights table and airport name with destination airport .", "context": "What are airlines that have flights arriving at airport 'AHD'? || select airlines.airline from airlines join airports where airports.airportname = 'AHD' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"AHD\" ) || Change airports table with flights table and airport name with destination airport.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.destairport = 'AHD'" }, { "prediction": "tvshow | select production_code, channel from cartoon order by original_air_date desc limit 1", "gold_parse": "SELECT production_code , channel FROM cartoon ORDER BY original_air_date LIMIT 1", "question": "What is the produdction code and channel of the most recent cartoon?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Title , Channel FROM Cartoon GROUP BY Channel ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Channel in Cartoon table', 'Step 2: find Title, Channel of Cartoon table with largest value in the results of step 1']", "feedback": "order by original air date and replace title with production code .", "context": "What is the produdction code and channel of the most recent cartoon? || select title, channel from cartoon group by channel order by count ( * ) desc limit 1 || tvshow | cartoon : production_code, channel, original_air_date || order by original air date and replace title with production code.", "label": "tvshow | select production_code, channel from cartoon order by original_air_date asc limit 1" }, { "prediction": "network_1 | select avg ( grade ) from highschooler where id in ( select student_id from friend )", "gold_parse": "SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)", "question": "Find the average grade of all students who have some friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Avg ( grade ) FROM Highschooler", "predicted_parse_explanation": "['find the average grade in Highschooler table']", "feedback": "Also mention that Highschooler's id should be present in friend table .", "context": "Find the average grade of all students who have some friends. || select avg ( grade ) from highschooler || network_1 | highschooler : grade, id | friend : student_id || Also mention that Highschooler's id should be present in friend table.", "label": "network_1 | select avg ( grade ) from highschooler where id in ( select friend.student_id from friend join highschooler on friend.student_id = highschooler.id )" }, { "prediction": "car_1 | select countries.countryname from countries join car_makers on countries.countryid = car_makers.country join continents on car_makers.id = continents.contid where continents.continent = 'Europe' group by countries.countryname having count ( * ) >= 3", "gold_parse": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3", "question": "Which countries in europe have at least 3 car manufacturers?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T1.CountryName FROM countries AS T1 JOIN car_makers AS T2 ON T1.CountryId = T2.Country GROUP BY T2.Country HAVING Count ( * ) > = 3", "predicted_parse_explanation": "['Step 1: For each row in countries table, find the corresponding rows in car_makers table', 'Step 2: find the number of rows of each value of Country in the results of step 1', 'Step 3: find CountryName in the results of step 1 whose corresponding value in step 2 is greater than or equals 3']", "feedback": "i want continents table from step 1 and verify that country is continent europe in step 2.", "context": "Which countries in europe have at least 3 car manufacturers? || select countries.countryname from countries join car_makers on countries.countryid = car_makers.country group by car_makers.country having count ( * ) > = 3 || car_1 | countries : countryname, countryid | car_makers : country, id | continents : contid, continent ( \"Europe\" ) || i want continents table from step 1 and verify that country is continent europe in step 2.", "label": "car_1 | select countries.countryname from countries join continents on countries.continent = continents.contid join car_makers on countries.countryid = car_makers.country where continents.continent = 'europe' group by countries.countryname having count ( * ) >= 3" }, { "prediction": "network_1 | select count ( * ), student_id from likes group by student_id", "gold_parse": "SELECT student_id , count(*) FROM Likes GROUP BY student_id", "question": "How many likes correspond to each student id?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT student_id , Count ( * ) FROM Friend GROUP BY student_id", "predicted_parse_explanation": "['find each value of student_id in Friend table along with the number of the corresponding rows to each value']", "feedback": "likes not Friends", "context": "How many likes correspond to each student id? || select student_id, count ( * ) from friend group by student_id || network_1 | likes : student_id || likes not Friends", "label": "network_1 | select student_id, count ( * ) from likes group by student_id" }, { "prediction": "world_1 | select name from country where continent = 'Asia' and population > ( select min ( population ) from country where continent = 'Africa' )", "gold_parse": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT min(population) FROM country WHERE Continent = \"Africa\")", "question": "What are the Asian countries which have a population larger than that of any country in Africa?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT GovernmentForm FROM country WHERE Continent = \"Asia\" AND Population > 103000", "predicted_parse_explanation": "['find GovernmentForm of country table whose Continent equals Asia and Population greater than 103000']", "feedback": "Change government form with name name , Ensure population greater than country whose Continent's name name equals Africa .", "context": "What are the Asian countries which have a population larger than that of any country in Africa? || select governmentform from country where continent = 'Asia' and population > 103000 || world_1 | country : name, continent ( \"Africa\" ), population || Change government form with name name, Ensure population greater than country whose Continent's name name equals Africa.", "label": "world_1 | select name from country where continent = 'Asia' and population > ( select min ( population ) from country where continent = 'Africa' )" }, { "prediction": "world_1 | select name from country where continent = 'Europe' and population > 80000", "gold_parse": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"", "question": "Give the names of countries that are in Europe and have a population equal to 80000.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country WHERE Continent = \"Europe\" INTERSECT SELECT Name FROM country WHERE Population > 103000", "predicted_parse_explanation": "['Step 1: find the Name of country table for which Continent equals Europe', 'Step 2: find the Name of country table for which Population greater than 103000', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "In step 2 it should ensure that population equals 80000 instead of population greater than 103000.", "context": "Give the names of countries that are in Europe and have a population equal to 80000. || select name from country where continent = 'Europe' intersect select name from country where population > 103000 || world_1 | country : name, continent ( \"Europe\" ), population ( 80000 ) || In step 2 it should ensure that population equals 80000 instead of population greater than 103000.", "label": "world_1 | select name from country where continent = 'Europe' and population = '80000'" }, { "prediction": "tvshow | select air_date from tv_series where episode = 'A Love of a Lifetime'", "gold_parse": "SELECT Air_Date FROM TV_series WHERE Episode = \"A Love of a Lifetime\"", "question": "When did the episode \"A Love of a Lifetime\" air?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T2.Episode FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T2.Channel = T1.id JOIN Cartoon AS T3 ON T1.id = T3.Channel WHERE T3.Title = \"A Love of a Lifetime\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find corresponding rows in TV_series table and in Cartoon table', 'Step 2: find Episode of the results of step 1 whose Title equals A Love of a Lifetime']", "feedback": "Sequentially, air date and episode required in place of episode and title.", "context": "When did the episode \"A Love of a Lifetime\" air? || select tv_series.episode from tv_channel join tv_series on tv_series.channel = tv_channel.id join cartoon on tv_channel.id = cartoon.channel where cartoon.title = 'A Love of a Lifetime' || tvshow | tv_series : air_date, episode ( \"A Love of a Lifetime\" ) || Sequentially, air date and episode required in place of episode and title.", "label": "tvshow | select air_date from tv_series where episode = 'A Love of a Lifetime'" }, { "prediction": "cre_Doc_Template_Mgt | select template_type_code from templates except select templates.template_type_code from documents join templates on documents.template_id = templates.template_id", "gold_parse": "SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", "question": "Show all template type codes that are not used by any document.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_Type_Code FROM Templates EXCEPT SELECT Template_Type_Code FROM Templates", "predicted_parse_explanation": "['Step 1: find the Template_Type_Code of Templates table', 'Step 2: find the Template_Type_Code of Templates table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "Need to look for the equivqlent code type of the result and in step 1 and 2 use template id.", "context": "Show all template type codes that are not used by any document. || select template_type_code from templates except select template_type_code from templates || cre_Doc_Template_Mgt | templates : template_type_code | documents : template_id || Need to look for the equivqlent code type of the result and in step 1 and 2 use template id.", "label": "cre_Doc_Template_Mgt | select template_type_code from templates except select template_type_code from templates join documents on templates.template_id = documents.template_id" }, { "prediction": "cre_Doc_Template_Mgt | select distinct templates.template_description from templates join documents on templates.template_id = documents.template_id", "gold_parse": "SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID", "question": "Return the different descriptions for templates that have been used in a document.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT DISTINCT Document_Description FROM Documents", "predicted_parse_explanation": "['find without repetition the Document_Description of Documents table']", "feedback": "Search for the non duplicate description of template type from reference template types table having similar template id available in documents table.", "context": "Return the different descriptions for templates that have been used in a document. || select distinct document_description from documents || cre_Doc_Template_Mgt | templates : template_description, template_id | documents : template_id || Search for the non duplicate description of template type from reference template types table having similar template id available in documents table.", "label": "cre_Doc_Template_Mgt | select distinct ref_template_types.template_type_description from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code join documents on templates.template_id = documents.template_id" }, { "prediction": "orchestra | select conductor.name, orchestra.orchestre from conductor join orchestra on conductor.director_id = orchestra.director_id", "gold_parse": "SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID", "question": "What are the names of conductors as well as the corresonding orchestras that they have conducted?", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT Name FROM conductor", "predicted_parse_explanation": "['find the Name of conductor table']", "feedback": "And also find corresponding orchestra from orchestra table .", "context": "What are the names of conductors as well as the corresonding orchestras that they have conducted? || select name from conductor || orchestra | conductor : name, conductor_id | orchestra : orchestra, conductor_id || And also find corresponding orchestra from orchestra table.", "label": "orchestra | select conductor.name, orchestra.orchestra from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id" }, { "prediction": "network_1 | select grade from highschooler group by grade having count ( * ) >= 4", "gold_parse": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4", "question": "Which grades have 4 or more high schoolers?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT grade FROM Highschooler WHERE grade = 9 OR grade = 4", "predicted_parse_explanation": "['find grade of Highschooler table whose grade equals 4 or grade equals 9']", "feedback": "Look for grade in which number of name of all grade is higher or equivalent to 4.", "context": "Which grades have 4 or more high schoolers? || select grade from highschooler where grade = 9 or grade = 4 || network_1 | highschooler : grade || Look for grade in which number of name of all grade is higher or equivalent to 4.", "label": "network_1 | select grade from highschooler group by grade having count ( * ) >= 4" }, { "prediction": "flight_2 | select count ( * ) from flights where destairport = 'AHD' and airline = 'United Airlines'", "gold_parse": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.SourceAirport = \"AHD\"", "question": "How many 'United Airlines' flights depart from Airport 'AHD'?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"United Airlines\" AND T1.Airline = \"AHD\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in airports table', \"Step 2: find the number of rows in the results of step 1 whose airports's Country equals United Airlines and Airline equals AHD\"]", "feedback": "Find number of flights whose airline's airline equals United airlines and source airport equals AHD", "context": "How many 'United Airlines' flights depart from Airport 'AHD'? || select count ( * ) from airlines join airports where airports.country = 'United Airlines' and airlines.airline = 'AHD' || flight_2 | flights : destairport ( \"AHD\" ), airline ( \"United Airlines\" ) || Find number of flights whose airline's airline equals United airlines and source airport equals AHD", "label": "flight_2 | select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.sourceairport = 'AHD'" }, { "prediction": "world_1 | select countrycode from countrylanguage where language = 'Spanish'", "gold_parse": "SELECT CountryCode , max(Percentage) FROM countrylanguage WHERE LANGUAGE = \"Spanish\" GROUP BY CountryCode", "question": "Return the codes of countries for which Spanish is the predominantly spoken language.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Code FROM country WHERE LocalName = \"Spanish\"", "predicted_parse_explanation": "['find the Code of country table for which LocalName equals Spanish']", "feedback": "make sure that t should be the is official of countrylanguage.", "context": "Return the codes of countries for which Spanish is the predominantly spoken language. || select code from country where localname = 'Spanish' || world_1 | countrylanguage : countrycode, language ( \"Spanish\" ) || make sure that t should be the is official of countrylanguage.", "label": "world_1 | select countrycode, max ( percentage ) from countrylanguage where language = 'Spanish' group by countrycode" }, { "prediction": "voter_1 | select contestants.contestant_number, contestants.contestant_name from contestants join votes on contestants.contestant_number = votes.contestant_number group by votes.contestant_number having count ( * ) >= 2", "gold_parse": "SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING count(*) >= 2", "question": "What are the contestant numbers and names of the contestants who had at least two votes?", "db_id": "voter_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "AREA_CODE_STATE", "CONTESTANTS", "VOTES" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "area_code", "state", "contestant_number", "contestant_name", "vote_id", "phone_number", "state", "contestant_number", "created" ] }, "db_foreign_keys": { "column_id": [ 8, 7 ], "other_column_id": [ 3, 2 ] }, "predicted_parse_with_values": "SELECT contestant_number , contestant_name FROM CONTESTANTS GROUP BY contestant_name HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of contestant_name in CONTESTANTS table', 'Step 2: find contestant_number, contestant_name in CONTESTANTS table whose corresponding value in step 1 is greater than or equals 2']", "feedback": "Use contestant number , votes table rather than contestant name , contestants table in step 1.", "context": "What are the contestant numbers and names of the contestants who had at least two votes? || select contestant_number, contestant_name from contestants group by contestant_name having count ( * ) > = 2 || voter_1 | contestants : contestant_number, contestant_name | votes : contestant_number || Use contestant number, votes table rather than contestant name, contestants table in step 1.", "label": "voter_1 | select contestants.contestant_number, contestants.contestant_name from contestants join votes on contestants.contestant_number = votes.contestant_number group by contestants.contestant_number having count ( * ) >= 2" }, { "prediction": "wta_1 | select count ( distinct winner_hand ) from matches where tourney_name = 'WTA Championships'", "gold_parse": "SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L'", "question": "Find the number of left handed winners who participated in the WTA Championships.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM players", "predicted_parse_explanation": "['find the number of rows in players table']", "feedback": "Exchange players table with matches table . Ensure that winner hand equals to Left .", "context": "Find the number of left handed winners who participated in the WTA Championships. || select count ( * ) from players || wta_1 | matches : winner_hand, tourney_name ( \"WTA Championships\" ) || Exchange players table with matches table. Ensure that winner hand equals to Left.", "label": "wta_1 | select count ( distinct winner_name ) from matches where tourney_name = 'WTA Championships' and winner_hand = 'L'" }, { "prediction": "car_1 | select car_makers.maker, car_data.year from car_makers join cars_data on car_makers.id = cars_data.year group by car_makers.maker order by count ( * ) asc limit 1", "gold_parse": "SELECT T2.Make , T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT min(YEAR) FROM CARS_DATA)", "question": "What is the maker of the carr produced in the earliest year and what year was it?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT FullName , Maker FROM car_makers ORDER BY FullName Asc LIMIT 1", "predicted_parse_explanation": "['find the FullName, Maker of car_makers table with smallest value of FullName']", "feedback": "Exchange both full name with year .", "context": "What is the maker of the carr produced in the earliest year and what year was it? || select fullname, maker from car_makers order by fullname asc limit 1 || car_1 | car_makers : maker, id | cars_data : year || Exchange both full name with year.", "label": "car_1 | select car_names.make, cars_data.year from cars_data join car_names on cars_data.id = car_names.makeid where cars_data.year = ( select min ( year ) from cars_data )" }, { "prediction": "orchestra | select record_company from orchestra where year_of_founded < 2003 intersect select record_company from orchestra where year_of_founded > 2003", "gold_parse": "SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003", "question": "Show the record companies shared by orchestras founded before 2003 and after 2003.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT * FROM orchestra WHERE Year_of_Founded > 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003", "predicted_parse_explanation": "['Step 1: find the rows of orchestra table for which Year_of_Founded greater than 2003', 'Step 2: find the Record_Company of orchestra table for which Year_of_Founded less than 2003', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Find record company in place of rows in step 1.", "context": "Show the record companies shared by orchestras founded before 2003 and after 2003. || select * from orchestra where year_of_founded > 2003 intersect select record_company from orchestra where year_of_founded < 2003 || orchestra | orchestra : record_company, year_of_founded ( 2003 ) || Find record company in place of rows in step 1.", "label": "orchestra | select record_company from orchestra where year_of_founded < 2003 intersect select record_company from orchestra where year_of_founded > 2003" }, { "prediction": "world_1 | select continent from country where name = 'Anguilla'", "gold_parse": "SELECT Continent FROM country WHERE Name = \"Anguilla\"", "question": "Which continent is Anguilla in?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE LocalName = \"Anguilla\"", "predicted_parse_explanation": "['find the Continent of country table for which LocalName equals Anguilla']", "feedback": "It should be name name in place of local name .", "context": "Which continent is Anguilla in? || select continent from country where localname = 'Anguilla' || world_1 | country : continent, name ( \"Anguilla\" ) || It should be name name in place of local name.", "label": "world_1 | select continent from country where name = 'Anguilla'" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"AHD\"", "question": "What are airlines that have some flight departing from airport 'AHD'?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.AirportName = \"AHD\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in airports table', 'Step 2: find Airline of the results of step 1 whose AirportName equals AHD']", "feedback": "Put flights table instead of airports table In step 1 and source airport instead of airport name In step 2.", "context": "What are airlines that have some flight departing from airport 'AHD'? || select airlines.airline from airlines join airports where airports.airportname = 'AHD' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"AHD\" ) || Put flights table instead of airports table In step 1 and source airport instead of airport name In step 2.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'" }, { "prediction": "dog_kennels | select date_arrived, date_departed from dogs", "gold_parse": "SELECT date_arrived , date_departed FROM Dogs", "question": "What are the arriving date and the departing date of all the dogs?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT date_departed , date_of_birth FROM Dogs", "predicted_parse_explanation": "['find the date_departed, date_of_birth of Dogs table']", "feedback": "Rather than date of birth , Use date arrived in place of it .", "context": "What are the arriving date and the departing date of all the dogs? || select date_departed, date_of_birth from dogs || dog_kennels | dogs : date_arrived, date_departed || Rather than date of birth, Use date arrived in place of it.", "label": "dog_kennels | select date_arrived, date_departed from dogs" }, { "prediction": "world_1 | select name from country where continent = 'Europe' and population > 80000", "gold_parse": "SELECT Name FROM country WHERE continent = \"Europe\" AND Population = \"80000\"", "question": "Give the names of countries that are in Europe and have a population equal to 80000.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country WHERE Continent = \"Europe\" INTERSECT SELECT Name FROM country WHERE Population > 103000", "predicted_parse_explanation": "['Step 1: find the Name of country table for which Continent equals Europe', 'Step 2: find the Name of country table for which Population greater than 103000', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "you need to make sure that population as 8000 in step 2.", "context": "Give the names of countries that are in Europe and have a population equal to 80000. || select name from country where continent = 'Europe' intersect select name from country where population > 103000 || world_1 | country : name, continent ( \"Europe\" ), population ( 80000 ) || you need to make sure that population as 8000 in step 2.", "label": "world_1 | select name from country where continent = 'Europe' and population = '80000'" }, { "prediction": "pets_1 | select count ( * ) from pets where weight > 10", "gold_parse": "SELECT count(*) FROM pets WHERE weight > 10", "question": "Find the number of pets whose weight is heavier than 10.", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Pets WHERE pet_age > 10", "predicted_parse_explanation": "['find the number of rows in Pets table whose pet_age greater than 10']", "feedback": "Exchange pet age with weight .", "context": "Find the number of pets whose weight is heavier than 10. || select count ( * ) from pets where pet_age > 10 || pets_1 | pets : weight ( 10 ) || Exchange pet age with weight.", "label": "pets_1 | select count ( * ) from pets where weight > 10" }, { "prediction": "battle_death | select name, result, bulgarian_commander from battle where id not in ( select lost_in_battle from ship where location = 'English Channel' )", "gold_parse": "SELECT name , RESULT , bulgarian_commander FROM battle EXCEPT SELECT T1.name , T1.result , T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'", "question": "Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT T1.name , T1.result , T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name ! = \"English Channel\"", "predicted_parse_explanation": "['Step 1: For each row in battle table, find the corresponding rows in ship table', \"Step 2: find battle's name, result, bulgarian_commander of the results of step 1 whose ship's name not equals English Channel\"]", "feedback": "Here it should be location not equals English Channel instead of name in step 2.", "context": "Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'. || select battle.name, battle.result, battle.bulgarian_commander from battle join ship on battle.id = ship.lost_in_battle where ship.name! = 'English Channel' || battle_death | battle : name, result, bulgarian_commander, id | ship : lost_in_battle, location ( \"English Channel\" ) || Here it should be location not equals English Channel instead of name in step 2.", "label": "battle_death | select name, result, bulgarian_commander from battle except select battle.name, battle.result, battle.bulgarian_commander from battle join ship on battle.id = ship.lost_in_battle where ship.location = 'English Channel'" }, { "prediction": "tvshow | select id from tv_channel where country > 2", "gold_parse": "SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2", "question": "find id of the tv channels that from the countries where have more than two tv channels.", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Content FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T1.id = T2.Channel GROUP BY T2.Channel HAVING Count ( * ) > 2", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in TV_series table', 'Step 2: find the number of rows of each value of Channel in the results of step 1', 'Step 3: find Content in the results of step 1 whose corresponding value in step 2 is greater than 2']", "feedback": "You have to use country in step 2 and id in step 3 in place of channel and content respectively.", "context": "find id of the tv channels that from the countries where have more than two tv channels. || select tv_channel.content from tv_channel join tv_series on tv_channel.id = tv_series.channel group by tv_series.channel having count ( * ) > 2 || tvshow | tv_channel : id, country || You have to use country in step 2 and id in step 3 in place of channel and content respectively.", "label": "tvshow | select id from tv_channel group by country having count ( * ) > 2" }, { "prediction": "wta_1 | select winner_name from matches where winner_rank_points = ( select max ( winner_rank_points ) from matches where tourney_name = 'Australian Open' )", "gold_parse": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1", "question": "What is the name of the winner with the most rank points who participated in the Australian Open tournament?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT winner_name FROM matches WHERE loser_ioc = \"Australian Open\" ORDER BY winner_rank Asc LIMIT 1", "predicted_parse_explanation": "['find the winner_name of matches table for which loser_ioc equals Australian Open with smallest value of winner_rank']", "feedback": "You have to use tourney name and \"largest value of winner rank points\" instead of loser ioc and \"smallest value of winner rank\" respectively.", "context": "What is the name of the winner with the most rank points who participated in the Australian Open tournament? || select winner_name from matches where loser_ioc = 'Australian Open' order by winner_rank asc limit 1 || wta_1 | matches : winner_name, winner_rank_points, tourney_name ( \"Australian Open\" ) || You have to use tourney name and \"largest value of winner rank points\" instead of loser ioc and \"smallest value of winner rank\" respectively.", "label": "wta_1 | select winner_name from matches where tourney_name = 'Australian Open' order by winner_rank_points desc limit 1" }, { "prediction": "student_transcripts_tracking | select distinct addresses.address_id from addresses join students on addresses.address_id = students.current_address_id", "gold_parse": "SELECT count(DISTINCT current_address_id) FROM Students", "question": "What are the different addresses that have students living there?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT DISTINCT email_address FROM Students", "predicted_parse_explanation": "['find without repetition the email_address of Students table']", "feedback": "I want current address id.", "context": "What are the different addresses that have students living there? || select distinct email_address from students || student_transcripts_tracking | addresses : address_id | students : current_address_id || I want current address id.", "label": "student_transcripts_tracking | select count ( distinct current_address_id ) from students" }, { "prediction": "flight_2 | select count ( * ) from flights where sourceairport = 'APG'", "gold_parse": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"", "question": "Count the number of flights departing from 'APG'.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines WHERE Airline = \"APG\"", "predicted_parse_explanation": "['find the number of rows in airlines table whose Airline equals APG']", "feedback": "Substitute airlines with flights and airline with source airport .", "context": "Count the number of flights departing from 'APG'. || select count ( * ) from airlines where airline = 'APG' || flight_2 | flights : sourceairport ( \"APG\" ) || Substitute airlines with flights and airline with source airport.", "label": "flight_2 | select count ( * ) from flights where sourceairport = 'APG'" }, { "prediction": "orchestra | select count ( * ) from orchestra where major_record_format = 'CD' or major_record_format = 'DVD'", "gold_parse": "SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format = \"CD\" OR Major_Record_Format = \"DVD\"", "question": "Count the number of orchestras that have CD or DVD as their record format.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM performance WHERE Type > = \"CD\"", "predicted_parse_explanation": "['find the number of rows in performance table whose Type greater than or equals CD']", "feedback": "I want orchestra and use phrase 'Major Record Format CD or DVD' instead of 'Type greater than or'.", "context": "Count the number of orchestras that have CD or DVD as their record format. || select count ( * ) from performance where type > = 'CD' || orchestra | orchestra : major_record_format ( \"DVD\" ) || I want orchestra and use phrase 'Major Record Format CD or DVD' instead of 'Type greater than or'.", "label": "orchestra | select count ( * ) from orchestra where major_record_format = 'CD' or major_record_format = 'DVD'" }, { "prediction": "singer | select citizenship from singer where birth_year < 1945 intersect select citizenship from singer where birth_year > 1955", "gold_parse": "SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955", "question": "What are the citizenships that are shared by singers with a birth year before 1945 and after 1955?", "db_id": "singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "singer", "song" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Singer_ID", "Name", "Birth_Year", "Net_Worth_Millions", "Citizenship", "Song_ID", "Title", "Singer_ID", "Sales", "Highest_Position" ] }, "db_foreign_keys": { "column_id": [ 8 ], "other_column_id": [ 1 ] }, "predicted_parse_with_values": "SELECT Citizenship FROM singer WHERE Birth_Year > 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year < 1955", "predicted_parse_explanation": "['Step 1: find the Citizenship of singer table for which Birth_Year greater than 1945', 'Step 2: find the Citizenship of singer table for which Birth_Year less than 1955', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "You have to interchange less than and greater than with each other.", "context": "What are the citizenships that are shared by singers with a birth year before 1945 and after 1955? || select citizenship from singer where birth_year > 1945 intersect select citizenship from singer where birth_year < 1955 || singer | singer : citizenship, birth_year ( 1955 ) || You have to interchange less than and greater than with each other.", "label": "singer | select citizenship from singer where birth_year < 1945 intersect select citizenship from singer where birth_year > 1955" }, { "prediction": "cre_Doc_Template_Mgt | select templates.template_type_code from documents join templates on documents.template_id = templates.template_id group by templates.template_type_code order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1", "question": "Which template type code is used by most number of documents?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_Type_Code FROM Templates GROUP BY Template_Type_Code ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Template_Type_Code in Templates table', 'Step 2: find Template_Type_Code of Templates table with largest value in the results of step 1']", "feedback": "In step 1 , I want the documents table.", "context": "Which template type code is used by most number of documents? || select template_type_code from templates group by template_type_code order by count ( * ) desc limit 1 || cre_Doc_Template_Mgt | templates : template_type_code | documents : template_id || In step 1, I want the documents table.", "label": "cre_Doc_Template_Mgt | select templates.template_type_code from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code order by count ( * ) desc limit 1" }, { "prediction": "dog_kennels | select avg ( dogs.age ) from treatments join dogs on treatments.dog_id = dogs.dog_id", "gold_parse": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", "question": "Find the average age of the dogs who went through treatments.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( age ) FROM Dogs", "predicted_parse_explanation": "['find the average age in Dogs table']", "feedback": "Need to ensure that those dog's dog id present in treatments table .", "context": "Find the average age of the dogs who went through treatments. || select avg ( age ) from dogs || dog_kennels | dogs : age, dog_id | treatments : dog_id || Need to ensure that those dog's dog id present in treatments table.", "label": "dog_kennels | select avg ( age ) from dogs where dog_id in ( select dog_id from treatments )" }, { "prediction": "network_1 | select count ( distinct student_id ) from friend", "gold_parse": "SELECT student_id , count(*) FROM Friend GROUP BY student_id", "question": "How many friends does each student have?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Highschooler", "predicted_parse_explanation": "['find the number of rows in Highschooler table']", "feedback": "You need to search for the rows count for all student from Friends table.", "context": "How many friends does each student have? || select count ( * ) from highschooler || network_1 | friend : student_id || You need to search for the rows count for all student from Friends table.", "label": "network_1 | select student_id, count ( * ) from friend group by student_id" }, { "prediction": "pets_1 | select count ( * ) from pets join has_pet on pets.petid = has_pet.stuid join student on has_pet.petid = student.stuid where student.sex = 'F'", "gold_parse": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'", "question": "How many dog pets are raised by female students?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Pets WHERE PetType = \"F\" AND pet_age = 3", "predicted_parse_explanation": "['find the number of rows in Pets table whose PetType equals F and pet_age equals 3']", "feedback": "Find number of rows in has pet table whose pet type equals dog and sex equals F .", "context": "How many dog pets are raised by female students? || select count ( * ) from pets where pettype = 'F' and pet_age = 3 || pets_1 | pets : pettype ( \"dog\" ), petid | has_pet : stuid, petid | student : stuid, sex ( \"F\" ) || Find number of rows in has pet table whose pet type equals dog and sex equals F.", "label": "pets_1 | select count ( * ) from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where student.sex = 'F' and pets.pettype = 'dog'" }, { "prediction": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.headofstate = 'Beatrix'", "gold_parse": "SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = \"Beatrix\" AND T2.IsOfficial = \"T\"", "question": "What is the official language used in the country the name of whose head of state is Beatrix.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country WHERE Continent = \"Beatrix\"", "predicted_parse_explanation": "['find the Name of country table for which Continent equals Beatrix']", "feedback": "make sure is official equivalent with t . you need to use language , table of countrylanguage and code of country.", "context": "What is the official language used in the country the name of whose head of state is Beatrix. || select name from country where continent = 'Beatrix' || world_1 | countrylanguage : language, countrycode | country : code, headofstate ( \"Beatrix\" ) || make sure is official equivalent with t. you need to use language, table of countrylanguage and code of country.", "label": "world_1 | select countrylanguage.language from country join countrylanguage on country.code = countrylanguage.countrycode where country.headofstate = 'Beatrix' and countrylanguage.isofficial = 'T'" }, { "prediction": "car_1 | select max ( accelerate ), cylinders from cars_data group by cylinders", "gold_parse": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders", "question": "What is the maximum accelerate for all the different cylinders?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Max ( Cylinders ) , Accelerate FROM cars_data GROUP BY Cylinders", "predicted_parse_explanation": "['find each value of Cylinders in cars_data table along with the maximum Cylinders of the corresponding rows to each value']", "feedback": "Find different cylinders whose have maximum accelerate .", "context": "What is the maximum accelerate for all the different cylinders? || select max ( cylinders ), accelerate from cars_data group by cylinders || car_1 | cars_data : accelerate, cylinders || Find different cylinders whose have maximum accelerate.", "label": "car_1 | select max ( accelerate ), cylinders from cars_data group by cylinders" }, { "prediction": "student_transcripts_tracking | select first_name, middle_name, last_name from students order by date_first_registered asc limit 1", "gold_parse": "SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1", "question": "What is the first, middle, and last name of the first student to register?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT first_name , middle_name , last_name FROM Students", "predicted_parse_explanation": "['find the first_name, middle_name, last_name of Students table']", "feedback": "Ensure that date first registered is smallest .", "context": "What is the first, middle, and last name of the first student to register? || select first_name, middle_name, last_name from students || student_transcripts_tracking | students : first_name, middle_name, last_name, date_first_registered || Ensure that date first registered is smallest.", "label": "student_transcripts_tracking | select first_name, middle_name, last_name from students order by date_first_registered asc limit 1" }, { "prediction": "pets_1 | select count ( * ) from pets join has_pet on pets.petid = has_pet.stuid join student on has_pet.petid = student.stuid where student.sex = 'F'", "gold_parse": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'", "question": "Find the number of dog pets that are raised by female students (with sex F).", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Pets WHERE PetType = \"dog\" AND PetType = \"F\"", "predicted_parse_explanation": "['find the number of rows in Pets table whose PetType equals F and PetType equals dog']", "feedback": "i want the number of rows of has pet table whose pet type is dog and sex is female.", "context": "Find the number of dog pets that are raised by female students (with sex F). || select count ( * ) from pets where pettype = 'dog' and pettype = 'F' || pets_1 | pets : pettype ( \"dog\" ), petid | has_pet : stuid, petid | student : stuid, sex ( \"F\" ) || i want the number of rows of has pet table whose pet type is dog and sex is female.", "label": "pets_1 | select count ( * ) from student join has_pet on student.stuid = has_pet.stuid join pets on has_pet.petid = pets.petid where student.sex = 'F' and pets.pettype = 'dog'" }, { "prediction": "world_1 | select name from country where population < ( select min ( population ) from country where continent = 'Africa' )", "gold_parse": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT min(population) FROM country WHERE Continent = \"Asia\")", "question": "Which African countries have a smaller population than that of any country in Asia?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT GovernmentForm FROM country WHERE Population < ( SELECT Population FROM country WHERE Continent = \"Africa\" )", "predicted_parse_explanation": "['Step 1: find the Population of country table for which Continent equals Africa', 'Step 2: find the GovernmentForm of country table whose Population less than the results of step 1']", "feedback": "Use Asia and name in place of Africa and government form in step 1 and 2 respectively.", "context": "Which African countries have a smaller population than that of any country in Asia? || select governmentform from country where population < ( select population from country where continent = 'Africa' ) || world_1 | country : name, population, continent ( \"Asia\" ) || Use Asia and name in place of Africa and government form in step 1 and 2 respectively.", "label": "world_1 | select name from country where continent = 'Africa' and population < ( select min ( population ) from country where continent = 'Asia' )" }, { "prediction": "real_estate_properties | select property_name from properties where property_type_code = 'House' or property_type_code = 'Apartment' where room_count > 1", "gold_parse": "SELECT property_name FROM Properties WHERE property_type_code = \"House\" UNION SELECT property_name FROM Properties WHERE property_type_code = \"Apartment\" AND room_count > 1", "question": "What are the names of properties that are either houses or apartments with more than 1 room?", "db_id": "real_estate_properties", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Feature_Types", "Ref_Property_Types", "Other_Available_Features", "Properties", "Other_Property_Features" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4 ], "column_name": [ "*", "feature_type_code", "feature_type_name", "property_type_code", "property_type_description", "feature_id", "feature_type_code", "feature_name", "feature_description", "property_id", "property_type_code", "date_on_market", "date_sold", "property_name", "property_address", "room_count", "vendor_requested_price", "buyer_offered_price", "agreed_selling_price", "apt_feature_1", "apt_feature_2", "apt_feature_3", "fld_feature_1", "fld_feature_2", "fld_feature_3", "hse_feature_1", "hse_feature_2", "hse_feature_3", "oth_feature_1", "oth_feature_2", "oth_feature_3", "shp_feature_1", "shp_feature_2", "shp_feature_3", "other_property_details", "property_id", "feature_id", "property_feature_description" ] }, "db_foreign_keys": { "column_id": [ 6, 10, 35, 36 ], "other_column_id": [ 1, 3, 9, 5 ] }, "predicted_parse_with_values": "SELECT property_name FROM Properties WHERE room_count > 1", "predicted_parse_explanation": "['find the property_name of Properties table for which room_count greater than 1']", "feedback": "Be certain to find only for which property type code equals houses or apartments .", "context": "What are the names of properties that are either houses or apartments with more than 1 room? || select property_name from properties where room_count > 1 || real_estate_properties | properties : property_name, property_type_code ( \"Apartment\" ), room_count ( 1 ) || Be certain to find only for which property type code equals houses or apartments.", "label": "real_estate_properties | select property_name from properties where property_type_code = 'House' union select property_name from properties where property_type_code = 'Apartment' and room_count > 1" }, { "prediction": "tvshow | select weekly_rank from tv_series where episode = 'A Love of a Lifetime'", "gold_parse": "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"A Love of a Lifetime\"", "question": "What is the weekly rank for the episode \"A Love of a Lifetime\"?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T2.Weekly_Rank FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T2.Channel = T1.id JOIN Cartoon AS T3 ON T1.id = T3.Channel WHERE T3.Title = \"A Love of a Lifetime\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find corresponding rows in TV_series table and in Cartoon table', 'Step 2: find Weekly_Rank of the results of step 1 whose Title equals A Love of a Lifetime']", "feedback": "Use episode instead of title .", "context": "What is the weekly rank for the episode \"A Love of a Lifetime\"? || select tv_series.weekly_rank from tv_channel join tv_series on tv_series.channel = tv_channel.id join cartoon on tv_channel.id = cartoon.channel where cartoon.title = 'A Love of a Lifetime' || tvshow | tv_series : weekly_rank, episode ( \"A Love of a Lifetime\" ) || Use episode instead of title.", "label": "tvshow | select weekly_rank from tv_series where episode = 'A Love of a Lifetime'" }, { "prediction": "pets_1 | select count ( * ) from has_pet join student on has_pet.petid = student.stuid where student.age > 20", "gold_parse": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", "question": "How many pets are owned by students that have an age greater than 20?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Pets WHERE pet_age > 20", "predicted_parse_explanation": "['find the number of rows in Pets table whose pet_age greater than 20']", "feedback": "Need to find Student's age in place of pet age .", "context": "How many pets are owned by students that have an age greater than 20? || select count ( * ) from pets where pet_age > 20 || pets_1 | has_pet : petid, stuid | student : stuid, age ( 20 ) | pets : petid || Need to find Student's age in place of pet age.", "label": "pets_1 | select count ( * ) from student join has_pet on student.stuid = has_pet.stuid where student.age > 20" }, { "prediction": "network_1 | select highschooler.name from highschooler join likes on highschooler.id = likes.student_id group by likes.student_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "question": "Give the name of the student with the most likes.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.name FROM Highschooler AS T1 JOIN Friend AS T2 ON T1.ID = T2.student_id GROUP BY T2.student_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Highschooler table, find the corresponding rows in Friend table', 'Step 2: find the number of rows of each value of student_id in the results of step 1', 'Step 3: find name of step 1 results with largest value in the results of step 2']", "feedback": "In step 1, Swap friend table with likes table.", "context": "Give the name of the student with the most likes. || select highschooler.name from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id order by count ( * ) desc limit 1 || network_1 | highschooler : name, id | likes : student_id || In step 1, Swap friend table with likes table.", "label": "network_1 | select highschooler.name from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id order by count ( * ) desc limit 1" }, { "prediction": "student_transcripts_tracking | select semesters.semester_name, semesters.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id group by semesters.semester_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1", "question": "For each semester, what is the name and id of the one with the most students registered?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT semester_name , semester_id FROM Semesters GROUP BY semester_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of semester_id in Semesters table', 'Step 2: find semester_name, semester_id of Semesters table with largest value in the results of step 1']", "feedback": "I want enrollment of student in step 1.", "context": "For each semester, what is the name and id of the one with the most students registered? || select semester_name, semester_id from semesters group by semester_id order by count ( * ) desc limit 1 || student_transcripts_tracking | semesters : semester_name, semester_id | student_enrolment : semester_id || I want enrollment of student in step 1.", "label": "student_transcripts_tracking | select semesters.semester_name, semesters.semester_id from semesters join student_enrolment on semesters.semester_id = student_enrolment.semester_id group by semesters.semester_id order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select count ( * ) from airlines join flights on airlines.uid = flights.airport where airlines.airport = 'JetBlue Airways'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline = T2.uid WHERE T2.Airline = \"JetBlue Airways\"", "question": "How many flights does airline 'JetBlue Airways' have?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines WHERE Airline = \"JetBlue Airways\"", "predicted_parse_explanation": "['find the number of rows in airlines table whose Airline equals JetBlue Airways']", "feedback": "Find number of rows of flights table whose corresponding airlines's airport name equals JetBlue Airways .", "context": "How many flights does airline 'JetBlue Airways' have? || select count ( * ) from airlines where airline = 'JetBlue Airways' || flight_2 | airlines : uid, airline ( \"JetBlue Airways\" ) | flights : airline || Find number of rows of flights table whose corresponding airlines's airport name equals JetBlue Airways.", "label": "flight_2 | select count ( * ) from flights join airlines on flights.airline = airlines.uid where airlines.airline = 'JetBlue Airways'" }, { "prediction": "student_transcripts_tracking | select departments.department_name, count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id group by departments.department_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.department_name , T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY count(*) DESC LIMIT 1", "question": "For each department id, what is the name of the department with the most number of degrees?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T1.department_name , Count ( * ) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Departments table, find the corresponding rows in Degree_Programs table', \"Step 2: for each value of Degree_Programs's department_id in the results of step 1, calculate number of rows\", \"Step 3: show each value of Degree_Programs's department_id in the results of step 1 along with the number of rows with largest value in the results of step 2\"]", "feedback": "In step 3 , also find department name .", "context": "For each department id, what is the name of the department with the most number of degrees? || select departments.department_name, count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id group by degree_programs.department_id order by count ( * ) desc limit 1 || student_transcripts_tracking | departments : department_name, department_id | degree_programs : department_id || In step 3, also find department name.", "label": "student_transcripts_tracking | select departments.department_name, degree_programs.department_id from degree_programs join departments on degree_programs.department_id = departments.department_id group by degree_programs.department_id order by count ( * ) desc limit 1" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from documents", "gold_parse": "SELECT count(*) FROM Documents", "question": "How many documents do we have?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "It should be documents table , not reference template types table .", "context": "How many documents do we have? || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | documents : || It should be documents table, not reference template types table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from documents" }, { "prediction": "student_transcripts_tracking | select transcript_date, transcript_id from transcripts group by transcript_id order by count ( * ) asc limit 1", "gold_parse": "SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1", "question": "Show the date of the transcript which shows the least number of results, also list the id.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT transcript_id , transcript_id FROM Transcript_Contents GROUP BY transcript_id ORDER BY Count ( * ) Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of transcript_id in Transcript_Contents table', 'Step 2: find transcript_id, transcript_id of Transcript_Contents table with smallest value in the results of step 1']", "feedback": "In step 2 , I want the date of transcript from Transcripts table.", "context": "Show the date of the transcript which shows the least number of results, also list the id. || select transcript_id, transcript_id from transcript_contents group by transcript_id order by count ( * ) asc limit 1 || student_transcripts_tracking | transcripts : transcript_date, transcript_id || In step 2, I want the date of transcript from Transcripts table.", "label": "student_transcripts_tracking | select transcripts.transcript_date, transcript_contents.transcript_id from transcript_contents join transcripts on transcript_contents.transcript_id = transcripts.transcript_id group by transcript_contents.transcript_id order by count ( * ) asc limit 1" }, { "prediction": "flight_2 | select airlines.abbreviation, country from airlines join flights on airlines.abbreviation = flights.airline group by airlines.abbreviation order by count ( * ) asc limit 1", "gold_parse": "SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1", "question": "What is the abbreviation of the airilne has the fewest flights and what country is it in?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Abbreviation , Country FROM airlines GROUP BY Country ORDER BY Count ( * ) Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Country in airlines table', 'Step 2: find Abbreviation, Country of airlines table with smallest value in the results of step 1']", "feedback": "Change country , airlines table with airline , flights table .", "context": "What is the abbreviation of the airilne has the fewest flights and what country is it in? || select abbreviation, country from airlines group by country order by count ( * ) asc limit 1 || flight_2 | airlines : abbreviation, country | flights : airline || Change country, airlines table with airline, flights table.", "label": "flight_2 | select airlines.abbreviation, airlines.country from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) asc limit 1" }, { "prediction": "tvshow | select id from tv_channel except select channel from cartoon where directed_by = 'Ben Jones'", "gold_parse": "SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'", "question": "find the id of tv channels that do not play any cartoon directed by Ben Jones.", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.Content FROM TV_Channel AS T1 EXCEPT SELECT T1.Content FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Ben Jones\"", "predicted_parse_explanation": "['Step 1: find the Content of TV_Channel table', 'Step 2: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 3: find Content of the results of step 2 whose Written_by equals Ben Jones', 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "In step 1,use id written with cartoon's id and directed by in step 3.", "context": "find the id of tv channels that do not play any cartoon directed by Ben Jones. || select tv_channel.content from tv_channel except select tv_channel.content from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Ben Jones' || tvshow | tv_channel : id | cartoon : channel, directed_by ( \"Ben Jones\" ) || In step 1,use id written with cartoon's id and directed by in step 3.", "label": "tvshow | select id from tv_channel except select channel from cartoon where directed_by = 'Ben Jones'" }, { "prediction": "wta_1 | select players.first_name, players.country_code from players join matches on players.player_id = matches.winner_id where matches.turner_name = 'WTA Championships' intersect select players.first_name, players.country_code from players join matches on players.player_id = matches.winner_id where matches.turner_name = 'Australian Open'", "gold_parse": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'", "question": "What are the first names and country codes for players who won both the WTA Championships and the Australian Open?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.country_code FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id WHERE T2.loser_ioc = \"WTA Championships\" INTERSECT SELECT T1.first_name , T1.country_code FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id WHERE T2.loser_ioc = \"Australian Open\"", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find first_name, country_code of the results of step 1 whose loser_ioc equals WTA Championships', 'Step 3: find first_name, country_code of the results of step 1 whose loser_ioc equals Australian Open', 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "Interchange loser ioc with tourney name in step 2 and 3.", "context": "What are the first names and country codes for players who won both the WTA Championships and the Australian Open? || select players.first_name, players.country_code from players join matches on players.player_id = matches.loser_id where matches.loser_ioc = 'WTA Championships' intersect select players.first_name, players.country_code from players join matches on players.player_id = matches.loser_id where matches.loser_ioc = 'Australian Open' || wta_1 | players : first_name, country_code, player_id | matches : winner_id, tourney_name ( \"Australian Open\" ) || Interchange loser ioc with tourney name in step 2 and 3.", "label": "wta_1 | select players.country_code, players.first_name from players join matches on players.player_id = matches.winner_id where matches.tourney_name = 'WTA Championships' intersect select players.country_code, players.first_name from players join matches on players.player_id = matches.winner_id where matches.tourney_name = 'Australian Open'" }, { "prediction": "dog_kennels | select breeds.breed_name from breeds join dogs on breeds.breed_code = dogs.breed_code group by breeds.breed_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the breed with the most dogs?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code ORDER BY T2.weight Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in Breeds table, find the corresponding rows in Dogs table', 'Step 2: find breed_name of the results of step 1 with largest value of weight']", "feedback": "Not largest value of weight but Whose breed code count is highest .", "context": "What is the name of the breed with the most dogs? || select breeds.breed_name from breeds join dogs on breeds.breed_code = dogs.breed_code order by dogs.weight desc limit 1 || dog_kennels | breeds : breed_name, breed_code | dogs : breed_code || Not largest value of weight but Whose breed code count is highest.", "label": "dog_kennels | select breeds.breed_name from breeds join dogs on breeds.breed_code = dogs.breed_code group by breeds.breed_name order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select sum ( population ), avg ( surfacearea ) from country where surfacearea > 3000 and continent = 'Noth America'", "gold_parse": "SELECT sum(Population) , avg(SurfaceArea) FROM country WHERE Continent = \"North America\" AND SurfaceArea > 3000", "question": "Give the total population and average surface area corresponding to countries in Noth America that have a surface area greater than 3000.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Sum ( Population ) , Avg ( Continent ) FROM country WHERE SurfaceArea > 3000", "predicted_parse_explanation": "['find the summation of Population and the average Continent in country table whose SurfaceArea greater than 3000']", "feedback": "you need to use surface area and along with that continent should equivalent with north america.", "context": "Give the total population and average surface area corresponding to countries in Noth America that have a surface area greater than 3000. || select sum ( population ), avg ( continent ) from country where surfacearea > 3000 || world_1 | country : population, surfacearea ( 3000 ), continent ( \"Noth America\" ) || you need to use surface area and along with that continent should equivalent with north america.", "label": "world_1 | select sum ( population ), avg ( surfacearea ) from country where continent = 'North America' and surfacearea > 3000" }, { "prediction": "world_1 | select region, population from country where name = 'Angola'", "gold_parse": "SELECT Population , Region FROM country WHERE Name = \"Angola\"", "question": "What region does Angola belong to and what is its population?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Region , Population FROM country", "predicted_parse_explanation": "['find the Region, Population of country table']", "feedback": "Name should be Angola.", "context": "What region does Angola belong to and what is its population? || select region, population from country || world_1 | country : region, population, name ( \"Angola\" ) || Name should be Angola.", "label": "world_1 | select population, region from country where name = 'Angola'" }, { "prediction": "orchestra | select conductor.name from orchestra join conductor on orchestra.conductor_id = conductor.conductor_id where orchestra.year_of_founded > 2003 order by orchestra.year_of_founded desc limit 2008", "gold_parse": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008", "question": "Please show the name of the conductor that has conducted orchestras founded after 2008.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE T2.Year_of_Founded > 2003 ORDER BY T2.Year_of_Founded Desc LIMIT 2008", "predicted_parse_explanation": "['Step 1: For each row in conductor table, find the corresponding rows in orchestra table', 'Step 2: find the Name in the results of step 1 whose Year_of_Founded greater than 2003 ordered descending by Year_of_Founded', 'Step 3: only show the first 2008 rows of the results']", "feedback": "In step 3 , delete the condition for descending order for the year founded , alter 200 3 with 2008.", "context": "Please show the name of the conductor that has conducted orchestras founded after 2008. || select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id where orchestra.year_of_founded > 2003 order by orchestra.year_of_founded desc limit 2008 || orchestra | conductor : name, conductor_id | orchestra : conductor_id, year_of_founded ( 2008 ) || In step 3, delete the condition for descending order for the year founded, alter 200 3 with 2008.", "label": "orchestra | select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id where year_of_founded > 2008" }, { "prediction": "orchestra | select orchestra.year_of_founded from performance join orchestra on performance.orchestral_id = orchestra.orchestral_id group by orchestra.year_of_founded having count ( * ) > 1", "gold_parse": "SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1", "question": "What are years of founding for orchestras that have had more than a single performance?", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT Year_of_Founded FROM orchestra GROUP BY Year_of_Founded HAVING Count ( * ) > 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Year_of_Founded in orchestra table', 'Step 2: find Year_of_Founded in orchestra table whose corresponding value in step 1 is greater than 1']", "feedback": "Replace year of founded in orchestra table with orchestra id in performance table in step 1.", "context": "What are years of founding for orchestras that have had more than a single performance? || select year_of_founded from orchestra group by year_of_founded having count ( * ) > 1 || orchestra | orchestra : year_of_founded, orchestra_id | performance : orchestra_id || Replace year of founded in orchestra table with orchestra id in performance table in step 1.", "label": "orchestra | select year_of_founded from orchestra join performance on orchestra.orchestra_id = performance.orchestra_id group by performance.orchestra_id having count ( * ) > 1" }, { "prediction": "world_1 | select continent from country join countrylanguage on country.continent = countrylanguage.continent group by continent.continent order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1", "question": "Which continent speaks the most languages?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country GROUP BY Continent ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Continent in country table', 'Step 2: find Continent of country table with largest value in the results of step 1']", "feedback": "give me the continent where maximum number of language are spoken.", "context": "Which continent speaks the most languages? || select continent from country group by continent order by count ( * ) desc limit 1 || world_1 | country : continent | countrylanguage : continent || give me the continent where maximum number of language are spoken.", "label": "world_1 | select country.continent from country join countrylanguage on country.code = countrylanguage.countrycode group by country.continent order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select flightno from flights where sourceairport = 'APG'", "gold_parse": "SELECT FlightNo FROM FLIGHTS WHERE DestAirport = \"APG\"", "question": "What are flight numbers of flights arriving at Airport \"APG\"?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T2.FlightNo FROM airports AS T1 JOIN flights AS T2 ON T1.AirportCode = T2.SourceAirport WHERE T1.AirportName = \"APG\"", "predicted_parse_explanation": "['Step 1: For each row in airports table, find the corresponding rows in flights table', 'Step 2: find FlightNo of the results of step 1 whose AirportName equals APG']", "feedback": "No need to find airport name , need to find destination airport instead of that .", "context": "What are flight numbers of flights arriving at Airport \"APG\"? || select flights.flightno from airports join flights on airports.airportcode = flights.sourceairport where airports.airportname = 'APG' || flight_2 | flights : flightno, sourceairport ( \"APG\" ) || No need to find airport name, need to find destination airport instead of that.", "label": "flight_2 | select flightno from flights where destairport = 'APG'" }, { "prediction": "car_1 | select model_list.model from model_list join cars_data on model_list.modelid = cars_data.id order by cars_data.mpg desc limit 1", "gold_parse": "SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.mpg DESC LIMIT 1", "question": "Which model saves the most gasoline? That is to say, have the maximum miles per gallon.", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T1.Model FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id ORDER BY T3.Accelerate Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in car_names table, find corresponding rows in model_list table and in cars_data table', \"Step 2: find model_list's Model of the results of step 1 with largest value of Accelerate\"]", "feedback": "you have to look for highest value of mpg instead of accelerate.", "context": "Which model saves the most gasoline? That is to say, have the maximum miles per gallon. || select model_list.model from model_list join car_names on model_list.model = car_names.model join cars_data on car_names.makeid = cars_data.id order by cars_data.accelerate desc limit 1 || car_1 | model_list : model, modelid | cars_data : id, mpg || you have to look for highest value of mpg instead of accelerate.", "label": "car_1 | select car_names.model from car_names join cars_data on car_names.makeid = cars_data.id order by cars_data.mpg desc limit 1" }, { "prediction": "dog_kennels | select first_name, last_name, email_address from owners where state like '%North%'", "gold_parse": "SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'", "question": "Return the first name, last name and email of the owners living in a state whose name contains the substring 'North'.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT first_name , last_name , email_address FROM Owners WHERE first_name LIKE \"North\"", "predicted_parse_explanation": "['find the first_name, last_name, email_address of Owners table for which first_name contains North']", "feedback": "Use state in place of first name.", "context": "Return the first name, last name and email of the owners living in a state whose name contains the substring 'North'. || select first_name, last_name, email_address from owners where first_name like 'North' || dog_kennels | owners : first_name, last_name, email_address, state ( \"%North%\" ) || Use state in place of first name.", "label": "dog_kennels | select first_name, last_name, email_address from owners where state like '%North%'" }, { "prediction": "tvshow | select title from cartoon where directed_by = 'Ben Jones' or directed_by = 'Brandon Vietti'", "gold_parse": "SELECT Title FROM Cartoon WHERE Directed_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\"", "question": "What are the titles of all cartoons directed by Ben Jones or Brandon Vietti?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Title FROM Cartoon WHERE Written_by = \"Ben Jones\" OR Directed_by = \"Brandon Vietti\"", "predicted_parse_explanation": "['find Title of Cartoon table whose Written_by equals Ben Jones or Directed_by equals Brandon Vietti']", "feedback": "The written by is wrong , directed by is the right parameter .", "context": "What are the titles of all cartoons directed by Ben Jones or Brandon Vietti? || select title from cartoon where written_by = 'Ben Jones' or directed_by = 'Brandon Vietti' || tvshow | cartoon : title, directed_by ( \"Brandon Vietti\" ) || The written by is wrong, directed by is the right parameter.", "label": "tvshow | select title from cartoon where directed_by = 'Ben Jones' or directed_by = 'Brandon Vietti'" }, { "prediction": "world_1 | select region, population from country where name = 'Angola'", "gold_parse": "SELECT Population , Region FROM country WHERE Name = \"Angola\"", "question": "What are the region and population of Angola?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT SurfaceArea , Population FROM country", "predicted_parse_explanation": "['find the SurfaceArea, Population of country table']", "feedback": "i want region and also make sure that name of country should be angola.", "context": "What are the region and population of Angola? || select surfacearea, population from country || world_1 | country : region, population, name ( \"Angola\" ) || i want region and also make sure that name of country should be angola.", "label": "world_1 | select population, region from country where name = 'Angola'" }, { "prediction": "flight_2 | select city, country from airports where city = 'Alton'", "gold_parse": "SELECT City , Country FROM AIRPORTS WHERE AirportName = \"Alton\"", "question": "Which city and country is the Alton airport at?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT City , Country FROM airports WHERE AirportName = \"Alton\" AND Country = \"United States \"", "predicted_parse_explanation": "['find City, Country of airports table whose AirportName equals Alton and Country equals United States ']", "feedback": "delete the phrase \"\"and country equals united states\"\".", "context": "Which city and country is the Alton airport at? || select city, country from airports where airportname = 'Alton' and country = 'United States'|| flight_2 | airports : city ( \"Alton\" ), country || delete the phrase \"\"and country equals united states\"\".", "label": "flight_2 | select city, country from airports where airportname = 'Alton'" }, { "prediction": "dog_kennels | select owners.owner_id, owners.last_name from owners join treatments on owners.owner_id = treatments.dog_id group by owners.owner_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "question": "Which owner has paid for the most treatments on his or her dogs? List the owner id and last name.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT owner_id , last_name FROM Owners GROUP BY owner_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of owner_id in Owners table', 'Step 2: find owner_id, last_name of Owners table with largest value in the results of step 1']", "feedback": "Verify that the money which was used by the owner was for his or her dogs treament in step 1.", "context": "Which owner has paid for the most treatments on his or her dogs? List the owner id and last name. || select owner_id, last_name from owners group by owner_id order by count ( * ) desc limit 1 || dog_kennels | owners : owner_id, last_name | treatments : dog_id || Verify that the money which was used by the owner was for his or her dogs treament in step 1.", "label": "dog_kennels | select owners.owner_id, owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id group by owners.owner_id order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select count ( * ) from airports join flights on airports.airportname = flights.destairport join airports on flights.airport = airports.airportname where airports.city = 'Aberdeen' or airports.city = 'Abilene'", "gold_parse": "SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = \"Aberdeen\" OR T2.city = \"Abilene\"", "question": "How many flights land in Aberdeen or Abilene?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE AirportName = \"Aberdeen\" OR City = \"Abilene\"", "predicted_parse_explanation": "['find the number of rows in airports table whose AirportName equals Aberdeen or City equals Abilene']", "feedback": "you need to put city and flights table in place of airport name and airports table respectively.", "context": "How many flights land in Aberdeen or Abilene? || select count ( * ) from airports where airportname = 'Aberdeen' or city = 'Abilene' || flight_2 | airports : airportname, city ( \"Abilene\" ) | flights : destairport, airport | airports : airportname, city ( \"Aberdeen\" ) || you need to put city and flights table in place of airport name and airports table respectively.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen' or airports.city = 'Abilene'" }, { "prediction": "car_1 | select count ( * ) from car_makers where country = 'France'", "gold_parse": "SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france'", "question": "What is the number of makers of care in France?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM car_makers WHERE Country = \"france\"", "predicted_parse_explanation": "['find the number of rows in car_makers table whose Country equals france']", "feedback": "Verify that france is the country name of Country table.", "context": "What is the number of makers of care in France? || select count ( * ) from car_makers where country = 'france' || car_1 | car_makers : country ( \"France\" ) || Verify that france is the country name of Country table.", "label": "car_1 | select count ( * ) from car_makers join countries on car_makers.country = countries.countryid where countries.countryname = 'france'" }, { "prediction": "student_transcripts_tracking | select count ( * ) from transcripts", "gold_parse": "SELECT count(*) FROM Transcripts", "question": "How many transcripts are released?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Addresses", "predicted_parse_explanation": "['find the number of rows in Addresses table']", "feedback": "We need to use transcripts table instead of addresses", "context": "How many transcripts are released? || select count ( * ) from addresses || student_transcripts_tracking | transcripts : || We need to use transcripts table instead of addresses", "label": "student_transcripts_tracking | select count ( * ) from transcripts" }, { "prediction": "car_1 | select max ( accelerate ), cylinders from cars_data group by cylinders", "gold_parse": "SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders", "question": "What is the maximum accelerate for all the different cylinders?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Max ( Cylinders ) , Accelerate FROM cars_data GROUP BY Cylinders", "predicted_parse_explanation": "['find each value of Cylinders in cars_data table along with the maximum Cylinders of the corresponding rows to each value']", "feedback": "i want unique cylinders with highest accelerate.", "context": "What is the maximum accelerate for all the different cylinders? || select max ( cylinders ), accelerate from cars_data group by cylinders || car_1 | cars_data : accelerate, cylinders || i want unique cylinders with highest accelerate.", "label": "car_1 | select max ( accelerate ), cylinders from cars_data group by cylinders" }, { "prediction": "cre_Doc_Template_Mgt | select distinct templates.template_description from templates join documents on templates.template_id = documents.template_id", "gold_parse": "SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID", "question": "Return the different descriptions for templates that have been used in a document.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT DISTINCT Document_Description FROM Documents", "predicted_parse_explanation": "['find without repetition the Document_Description of Documents table']", "feedback": "Find without repetition template type description of reference template types whose corresponding template id in present in documents table .", "context": "Return the different descriptions for templates that have been used in a document. || select distinct document_description from documents || cre_Doc_Template_Mgt | templates : template_description, template_id | documents : template_id || Find without repetition template type description of reference template types whose corresponding template id in present in documents table.", "label": "cre_Doc_Template_Mgt | select distinct ref_template_types.template_type_description from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code join documents on templates.template_id = documents.template_id" }, { "prediction": "network_1 | select highschooler.name from highschooler join friend on highschooler.id = friend.student_id join likes on friend.student_id = likes.student_id", "gold_parse": "SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id", "question": "What are the names of high schoolers who both have friends and are liked?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT name FROM Highschooler WHERE grade = 9 INTERSECT SELECT name FROM Highschooler WHERE grade = 9", "predicted_parse_explanation": "['Step 1: find the name of Highschooler table for which grade equals 9', 'Step 2: find the name of Highschooler table for which grade equals 9', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Only ensure that corresponding student id present in friend in step 1 , and present in likes in step 2.", "context": "What are the names of high schoolers who both have friends and are liked? || select name from highschooler where grade = 9 intersect select name from highschooler where grade = 9 || network_1 | highschooler : name, id | friend : student_id | likes : student_id || Only ensure that corresponding student id present in friend in step 1, and present in likes in step 2.", "label": "network_1 | select highschooler.name from friend join highschooler on likes.student_id = highschooler.id intersect select highschooler.name from likes join highschooler on likes.liked_id = highschooler.id" }, { "prediction": "museum_visit | select visitor.id, visitor.name, visitor.level_of_membership from visitor join visit on visitor.id = visit.visitor_id join museum on visit.num_of_ticket = museum.museum_id order by visit.total_spent desc limit 1", "gold_parse": "SELECT t2.visitor_id , t1.name , t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY sum(t2.Total_spent) DESC LIMIT 1", "question": "What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?", "db_id": "museum_visit", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "museum", "visitor", "visit" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "Museum_ID", "Name", "Num_of_Staff", "Open_Year", "ID", "Name", "Level_of_membership", "Age", "Museum_ID", "visitor_ID", "Num_of_Ticket", "Total_spent" ] }, "db_foreign_keys": { "column_id": [ 10, 9 ], "other_column_id": [ 5, 1 ] }, "predicted_parse_with_values": "SELECT T3.visitor_ID , T2.Name , T1.Num_of_Staff FROM museum AS T1 JOIN visitor AS T2 JOIN visit AS T3 ON T1.Museum_ID = T3.Museum_ID AND T3.visitor_ID = T2.ID AND T1.Museum_ID = T3.Museum_ID GROUP BY T3.Museum_ID ORDER BY Sum ( T3.Total_spent ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in visit table, find corresponding rows in museum table and in visitor table', \"Step 2: find the summation of Total_spent of each value of visit's Museum_ID in the results of step 1\", \"Step 3: find visitor_ID, visitor's Name, Num_of_Staff of the results of step 1 with largest value in the results of step 2\"]", "feedback": "In step 3 Supplant num of staff with level of membership .", "context": "What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets? || select visit.visitor_id, visitor.name, museum.num_of_staff from museum join visitor join visit on museum.museum_id = visit.museum_id and visit.visitor_id = visitor.id and museum.museum_id = visit.museum_id group by visit.museum_id order by sum ( visit.total_spent ) desc limit 1 || museum_visit | visitor : id, name, level_of_membership | visit : visitor_id, num_of_ticket, total_spent || In step 3 Supplant num of staff with level of membership.", "label": "museum_visit | select visit.visitor_id, visitor.name, visitor.level_of_membership from visitor join visit on visitor.id = visit.visitor_id group by visit.visitor_id order by sum ( visit.total_spent ) desc limit 1" }, { "prediction": "student_transcripts_tracking | select other_student_details from students order by other_student_details desc", "gold_parse": "SELECT other_student_details FROM Students ORDER BY other_student_details DESC", "question": "What other details can you tell me about students in reverse alphabetical order?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT other_details FROM Student_Enrolment ORDER BY other_details Desc", "predicted_parse_explanation": "['find the other_details of Student_Enrolment table ordered descending by other_details']", "feedback": "Take other student details in place of other details and students table in place of student enrolment table .", "context": "What other details can you tell me about students in reverse alphabetical order? || select other_details from student_enrolment order by other_details desc || student_transcripts_tracking | students : other_student_details || Take other student details in place of other details and students table in place of student enrolment table.", "label": "student_transcripts_tracking | select other_student_details from students order by other_student_details desc" }, { "prediction": "wta_1 | select ranking_date, count ( * ) from rankings group by ranking_date", "gold_parse": "SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date", "question": "Find the total number of tours for each ranking date.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , winner_rank FROM matches GROUP BY winner_rank", "predicted_parse_explanation": "['find each value of winner_rank in matches table along with the number of the corresponding rows to each value']", "feedback": "Search tours of ranking table for all the value of ranking date.", "context": "Find the total number of tours for each ranking date. || select count ( * ), winner_rank from matches group by winner_rank || wta_1 | rankings : ranking_date, tours || Search tours of ranking table for all the value of ranking date.", "label": "wta_1 | select sum ( tours ), ranking_date from rankings group by ranking_date" }, { "prediction": "world_1 | select sum ( surfacearea ) from country where region = 'Caribbean'", "gold_parse": "SELECT sum(SurfaceArea) FROM country WHERE Region = \"Caribbean\"", "question": "How much surface area do the countires in the Carribean cover together?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT SurfaceArea FROM country WHERE Name = \"Caribbean\"", "predicted_parse_explanation": "['find the SurfaceArea of country table for which Name equals Caribbean']", "feedback": "Find summation of surface area and exchange name name with region .", "context": "How much surface area do the countires in the Carribean cover together? || select surfacearea from country where name = 'Caribbean' || world_1 | country : surfacearea, region ( \"Caribbean\" ) || Find summation of surface area and exchange name name with region.", "label": "world_1 | select sum ( surfacearea ) from country where region = 'Caribbean'" }, { "prediction": "student_transcripts_tracking | select student_enrolment.degree_program_id, degree_programs.degree_summary_name from student_enrolment join degree_programs on student_enrolment.degree_program_id = degree_programs.degree_program_id group by student_enrolment.degree_program_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.degree_program_id , T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1", "question": "Find the program which most number of students are enrolled in. List both the id and the summary.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_id , course_description FROM Courses GROUP BY course_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of course_id in Courses table', 'Step 2: find course_id, course_description of Courses table with largest value in the results of step 1']", "feedback": "Replace course id(both ) with degree program id , first courses with student enrolment , course description with degree summary name , second courses with degree programs .", "context": "Find the program which most number of students are enrolled in. List both the id and the summary. || select course_id, course_description from courses group by course_id order by count ( * ) desc limit 1 || student_transcripts_tracking | student_enrolment : degree_program_id | degree_programs : degree_summary_name, degree_program_id || Replace course id(both ) with degree program id, first courses with student enrolment, course description with degree summary name, second courses with degree programs.", "label": "student_transcripts_tracking | select degree_programs.degree_program_id, degree_programs.degree_summary_name from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id group by degree_programs.degree_program_id order by count ( * ) desc limit 1" }, { "prediction": "orchestra | select orchestra.year_of_founded from performance join orchestra on performance.orchestral_id = orchestra.orchestral_id group by orchestra.year_of_founded having count ( * ) > 1", "gold_parse": "SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID = T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*) > 1", "question": "Show the years in which orchestras that have given more than one performance are founded.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT Year_of_Founded FROM orchestra GROUP BY Year_of_Founded HAVING Count ( * ) > 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Year_of_Founded in orchestra table', 'Step 2: find Year_of_Founded in orchestra table whose corresponding value in step 1 is greater than 1']", "feedback": "For performance table you should use orchestra Id.", "context": "Show the years in which orchestras that have given more than one performance are founded. || select year_of_founded from orchestra group by year_of_founded having count ( * ) > 1 || orchestra | orchestra : year_of_founded, orchestra_id | performance : orchestra_id || For performance table you should use orchestra Id.", "label": "orchestra | select year_of_founded from orchestra join performance on orchestra.orchestra_id = performance.orchestra_id group by performance.orchestra_id having count ( * ) > 1" }, { "prediction": "world_1 | select countrycode from countrylanguage where language!= 'english'", "gold_parse": "SELECT DISTINCT CountryCode FROM countrylanguage WHERE LANGUAGE != \"English\"", "question": "What are the country codes of countries where people use languages other than English?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Code FROM country WHERE Population > \"English\"", "predicted_parse_explanation": "['find the Code of country table for which Population greater than English']", "feedback": "Swap population greater than English\" with \"countrylanguage's language not equals English\".", "context": "What are the country codes of countries where people use languages other than English? || select code from country where population > 'English' || world_1 | countrylanguage : countrycode, language ( \"english\" ) || Swap population greater than English\" with \"countrylanguage's language not equals English\".", "label": "world_1 | select distinct countrycode from countrylanguage where language!= 'English'" }, { "prediction": "cre_Doc_Template_Mgt | select count ( distinct template_id ) from documents", "gold_parse": "SELECT count(DISTINCT template_id) FROM Documents", "question": "Count the number of different templates used for documents.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "You have to look for the distinct code of template type from the reference template type table used for documents.", "context": "Count the number of different templates used for documents. || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | documents : template_id || You have to look for the distinct code of template type from the reference template type table used for documents.", "label": "cre_Doc_Template_Mgt | select count ( distinct template_id ) from documents" }, { "prediction": "wta_1 | select winner_name, winner_rank from matches order by winner_age asc limit 3", "gold_parse": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3", "question": "What are the names and ranks of the three youngest winners across all matches?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT tourney_name , winner_rank FROM matches ORDER BY loser_age Asc LIMIT 3", "predicted_parse_explanation": "['Step 1: find the tourney_name, winner_rank of matches table ordered ascending by loser_age', 'Step 2: only show the first 3 rows of the results']", "feedback": "Put winner name and winner age in place of tourney name and loser age .", "context": "What are the names and ranks of the three youngest winners across all matches? || select tourney_name, winner_rank from matches order by loser_age asc limit 3 || wta_1 | matches : winner_name, winner_rank, winner_age || Put winner name and winner age in place of tourney name and loser age.", "label": "wta_1 | select distinct winner_name, winner_rank from matches order by winner_age asc limit 3" }, { "prediction": "pets_1 | select count ( * ), student.stuid from student join has_pet on student.stuid = has_pet.stuid group by student.stuid", "gold_parse": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid", "question": "Find the number of pets for each student who has any pet and student id.", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Student", "predicted_parse_explanation": "['find the number of rows in Student table']", "feedback": "from has pet table look for student id whose rows number are corresponding to all the value.", "context": "Find the number of pets for each student who has any pet and student id. || select count ( * ) from student || pets_1 | student : stuid | has_pet : stuid || from has pet table look for student id whose rows number are corresponding to all the value.", "label": "pets_1 | select count ( * ), student.stuid from student join has_pet on student.stuid = has_pet.stuid group by student.stuid" }, { "prediction": "car_1 | select sum ( cylinders ) from cars_data where accelerate < 1", "gold_parse": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate ASC LIMIT 1", "question": "For a volvo model, how many cylinders does the version with least accelerate have?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM cars_data WHERE Accelerate = 1", "predicted_parse_explanation": "['find the number of rows in cars_data table whose Accelerate equals 1']", "feedback": "Find cylinders of cars data table with least value of accelerate and car names's model equals volvo .", "context": "For a volvo model, how many cylinders does the version with least accelerate have? || select count ( * ) from cars_data where accelerate = 1 || car_1 | cars_data : cylinders, accelerate ( 1 ) || Find cylinders of cars data table with least value of accelerate and car names's model equals volvo.", "label": "car_1 | select cars_data.cylinders from cars_data join car_names on cars_data.id = car_names.makeid where car_names.model = 'volvo' order by cars_data.accelerate asc limit 1" }, { "prediction": "dog_kennels | select owners.owner_id, owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id order by treatments.cost_of_treatment desc limit 1", "gold_parse": "SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1", "question": "Tell me the owner id and last name of the owner who spent the most on treatments of his or her dogs.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT owner_id , last_name FROM Owners GROUP BY owner_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of owner_id in Owners table', 'Step 2: find owner_id, last_name of Owners table with largest value in the results of step 1']", "feedback": "Need to search dog id from Treatments table who exist in the dog id of dogs table.", "context": "Tell me the owner id and last name of the owner who spent the most on treatments of his or her dogs. || select owner_id, last_name from owners group by owner_id order by count ( * ) desc limit 1 || dog_kennels | owners : owner_id, last_name | dogs : owner_id, dog_id | treatments : dog_id, cost_of_treatment || Need to search dog id from Treatments table who exist in the dog id of dogs table.", "label": "dog_kennels | select owners.owner_id, owners.last_name from owners join dogs on owners.owner_id = dogs.owner_id join treatments on dogs.dog_id = treatments.dog_id group by owners.owner_id order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select count ( * ) from airports join flights on airports.city = flights.destairport where airports.city = 'Aberdeen'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "question": "How many flights depart from City Aberdeen?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE City = \"Aberdeen\"", "predicted_parse_explanation": "['find the number of rows in airports table whose City equals Aberdeen']", "feedback": "Find number of rows in flights table whose SourceAirport's corresponding city equals Aberdeen .", "context": "How many flights depart from City Aberdeen? || select count ( * ) from airports where city = 'Aberdeen' || flight_2 | airports : city ( \"Aberdeen\" ) | flights : destairport || Find number of rows in flights table whose SourceAirport's corresponding city equals Aberdeen.", "label": "flight_2 | select count ( * ) from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'" }, { "prediction": "dog_kennels | select breed_code, size_code from dogs", "gold_parse": "SELECT DISTINCT breed_code , size_code FROM dogs", "question": "What are all the possible breed type and size type combinations?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T2.treatment_type_code , T1.weight FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id", "predicted_parse_explanation": "['Step 1: For each row in Dogs table, find the corresponding rows in Treatments table', 'Step 2: find treatment_type_code, weight of the results of step 1']", "feedback": "You have to swap the code of distinct breed and size with the code of treatment type and weight respectively in step 2.", "context": "What are all the possible breed type and size type combinations? || select treatments.treatment_type_code, dogs.weight from dogs join treatments on dogs.dog_id = treatments.dog_id || dog_kennels | dogs : breed_code, size_code || You have to swap the code of distinct breed and size with the code of treatment type and weight respectively in step 2.", "label": "dog_kennels | select distinct breed_code, size_code from dogs" }, { "prediction": "pets_1 | select count ( distinct stuid ) from has_pet", "gold_parse": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid", "question": "For students who have pets, how many pets does each student have?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT StuID , Count ( * ) FROM Student GROUP BY StuID", "predicted_parse_explanation": "['find each value of StuID in Student table along with the number of the corresponding rows to each value']", "feedback": "Need to use has pet table and not the student table.", "context": "For students who have pets, how many pets does each student have? || select stuid, count ( * ) from student group by stuid || pets_1 | has_pet : stuid || Need to use has pet table and not the student table.", "label": "pets_1 | select count ( * ), student.stuid from student join has_pet on student.stuid = has_pet.stuid group by student.stuid" }, { "prediction": "student_transcripts_tracking | select count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id where departments.department_name = 'engineer'", "gold_parse": "SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'", "question": "How many degrees does the engineering department have?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Departments WHERE department_name = \"engineer\"", "predicted_parse_explanation": "['find the number of rows in Departments table whose department_name equals engineer']", "feedback": "Ensure to find number of rows in degree programs table , not in departments table .", "context": "How many degrees does the engineering department have? || select count ( * ) from departments where department_name = 'engineer' || student_transcripts_tracking | departments : department_id, department_name ( \"engineer\" ) | degree_programs : department_id || Ensure to find number of rows in degree programs table, not in departments table.", "label": "student_transcripts_tracking | select count ( * ) from departments join degree_programs on departments.department_id = degree_programs.department_id where departments.department_name = 'engineer'" }, { "prediction": "dog_kennels | select owners.first_name, dogs.name from owners join dogs on owners.owner_id = dogs.owner_id where owners.state = 'Virginia'", "gold_parse": "SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia'", "question": "Find the first names of owners living in Virginia and the names of dogs they own.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT T1.first_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = \"Virginia\" AND T2.name = \"Kacey\"", "predicted_parse_explanation": "['Step 1: For each row in Owners table, find the corresponding rows in Dogs table', 'Step 2: find first_name of the results of step 1 whose state equals Virginia and name equals Kacey']", "feedback": "Make sure to search for the name in step 2 , and delete \"and name equals Kacey\" phrase .", "context": "Find the first names of owners living in Virginia and the names of dogs they own. || select owners.first_name from owners join dogs on owners.owner_id = dogs.owner_id where owners.state = 'Virginia' and dogs.name = 'Kacey' || dog_kennels | owners : first_name, owner_id, state ( \"Virginia\" ) | dogs : name, owner_id || Make sure to search for the name in step 2, and delete \"and name equals Kacey\" phrase.", "label": "dog_kennels | select owners.first_name, dogs.name from owners join dogs on owners.owner_id = dogs.owner_id where owners.state = 'Virginia'" }, { "prediction": "car_1 | select countries.countryname, count ( * ) from continents join countries on continents.continent = countries.continent group by countries.countryname", "gold_parse": "SELECT T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent", "question": "What is the name of each continent and how many car makers are there in each one?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Continent , Count ( * ) FROM continents GROUP BY Continent", "predicted_parse_explanation": "['find each value of Continent in continents table along with the number of the corresponding rows to each value']", "feedback": "It should be the number of the corresponding rows for each continent in car makers table .", "context": "What is the name of each continent and how many car makers are there in each one? || select continent, count ( * ) from continents group by continent || car_1 | countries : countryname, continent | continents : continent || It should be the number of the corresponding rows for each continent in car makers table.", "label": "car_1 | select continents.continent, count ( * ) from continents join countries on continents.contid = countries.continent join car_makers on countries.countryid = car_makers.country group by continents.continent" }, { "prediction": "wta_1 | select winner_name, winner_rank from matches order by winner_age asc limit 3", "gold_parse": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3", "question": "Find the name and rank of the 3 youngest winners across all matches.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT tourney_name , loser_rank FROM matches ORDER BY loser_age Asc LIMIT 3", "predicted_parse_explanation": "['Step 1: find the tourney_name, loser_rank of matches table ordered ascending by loser_age', 'Step 2: only show the first 3 rows of the results']", "feedback": "Change tourney name , loser rank and loser age with winner name , winner rank and winner age .", "context": "Find the name and rank of the 3 youngest winners across all matches. || select tourney_name, loser_rank from matches order by loser_age asc limit 3 || wta_1 | matches : winner_name, winner_rank, winner_age || Change tourney name, loser rank and loser age with winner name, winner rank and winner age.", "label": "wta_1 | select distinct winner_name, winner_rank from matches order by winner_age asc limit 3" }, { "prediction": "student_transcripts_tracking | select students.first_name, students.middle_name, students.last_name, student_enrolment.student_id from student_enrolment join students on student_enrolment.student_id = students.student_id join students on student_enrolment.degree_program_id = students.degree_program_id group by student_enrolment.student_id having count ( * ) = 2", "gold_parse": "SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2", "question": "Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T2.student_id HAVING Count ( * ) = 2", "predicted_parse_explanation": "['Step 1: For each row in Students table, find the corresponding rows in Student_Enrolment table', \"Step 2: find the number of rows of each value of Student_Enrolment's student_id in the results of step 1\", 'Step 3: find first_name, middle_name, last_name in the results of step 1 whose corresponding value in step 2 is equals 2']", "feedback": "also output student id", "context": "Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id. || select students.first_name, students.middle_name, students.last_name from students join student_enrolment on students.student_id = student_enrolment.student_id group by student_enrolment.student_id having count ( * ) = 2 || student_transcripts_tracking | students : first_name, middle_name, last_name, student_id | student_enrolment : student_id, degree_program_id || also output student id", "label": "student_transcripts_tracking | select students.first_name, students.middle_name, students.last_name, students.student_id from students join student_enrolment on students.student_id = student_enrolment.student_id group by students.student_id having count ( * ) = 2" }, { "prediction": "wta_1 | select avg ( loser_age ), avg ( winner_age ) from matches", "gold_parse": "SELECT avg(loser_age) , avg(winner_age) FROM matches", "question": "What are the average ages of losers and winners across matches?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Avg ( loser_age ) , Avg ( loser_age ) FROM matches", "predicted_parse_explanation": "['find the average loser_age and the average loser_age in matches table']", "feedback": "winner age should be used instead one of the loser age .", "context": "What are the average ages of losers and winners across matches? || select avg ( loser_age ), avg ( loser_age ) from matches || wta_1 | matches : loser_age, winner_age || winner age should be used instead one of the loser age.", "label": "wta_1 | select avg ( loser_age ), avg ( winner_age ) from matches" }, { "prediction": "dog_kennels | select professional_id, role_code, email_address from professionals except select professionals.professional_id, professionals.role_code, treatments.professional_id from treatments join professionals on treatments.professional_id = professionals.professional_id join dogs on treatments.dog_id = dogs.dog_id", "gold_parse": "SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id", "question": "Which professional did not operate any treatment on dogs? List the professional's id, role and email.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT professional_id , role_code , email_address FROM Professionals", "predicted_parse_explanation": "['Step 1: find the professional_id, role_code, email_address of Professionals table', 'Step 2: find the professional_id, role_code, email_address of Professionals table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "In step 2 Find only for whose corresponding professional id is in treatments table .", "context": "Which professional did not operate any treatment on dogs? List the professional's id, role and email. || select professional_id, role_code, email_address from professionals except select professional_id, role_code, email_address from professionals || dog_kennels | professionals : professional_id, role_code, email_address | treatments : professional_id, dog_id || In step 2 Find only for whose corresponding professional id is in treatments table.", "label": "dog_kennels | select professional_id, role_code, email_address from professionals except select professionals.professional_id, professionals.role_code, professionals.email_address from professionals join treatments on professionals.professional_id = treatments.professional_id" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = \"AHD\"", "question": "What are airlines that have flights arriving at airport 'AHD'?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.AirportName = \"AHD\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in airports table', 'Step 2: find Airline of the results of step 1 whose AirportName equals AHD']", "feedback": "i want the table of flights and destination airport.", "context": "What are airlines that have flights arriving at airport 'AHD'? || select airlines.airline from airlines join airports where airports.airportname = 'AHD' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"AHD\" ) || i want the table of flights and destination airport.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.destairport = 'AHD'" }, { "prediction": "car_1 | select count ( distinct model_list.model ) from car_makers join model_list on car_makers.id = model_list.makeid where car_makers.country = 'United States'", "gold_parse": "SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id JOIN COUNTRIES AS T3 ON T2.Country = T3.CountryId WHERE T3.CountryName = 'usa'", "question": "What is the count of the car models produced in the United States?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM car_makers WHERE Country = \"usa\"", "predicted_parse_explanation": "['find the number of rows in car_makers table whose Country equals usa']", "feedback": "Need to change car makers table with model list country to country name", "context": "What is the count of the car models produced in the United States? || select count ( * ) from car_makers where country = 'usa' || car_1 | model_list : model, makeid | car_makers : id, country ( \"United States\" ) || Need to change car makers table with model list country to country name", "label": "car_1 | select count ( * ) from model_list join car_makers on model_list.maker = car_makers.id join countries on car_makers.country = countries.countryid where countries.countryname = 'usa'" }, { "prediction": "car_1 | select count ( * ), car_makers.id, car_makers.fullname from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id", "gold_parse": "SELECT Count(*) , T2.FullName , T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id", "question": "What is the number of car models that are produced by each maker and what is the id and full name of each maker?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T2.ModelId , T1.FullName , Count ( * ) FROM car_makers AS T1 JOIN model_list AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id", "predicted_parse_explanation": "['Step 1: For each row in car_makers table, find the corresponding rows in model_list table', 'Step 2: for each value of Id in the results of step 1, find the number of rows along with ModelId and FullName']", "feedback": "For each id of car makers , find corresponding number of rows in model list , also display full name .", "context": "What is the number of car models that are produced by each maker and what is the id and full name of each maker? || select model_list.modelid, car_makers.fullname, count ( * ) from car_makers join model_list on car_makers.id = model_list.maker group by car_makers.id || car_1 | car_makers : id, fullname | model_list : maker || For each id of car makers, find corresponding number of rows in model list, also display full name.", "label": "car_1 | select count ( * ), car_makers.fullname, car_makers.id from model_list join car_makers on model_list.maker = car_makers.id group by car_makers.id" }, { "prediction": "student_transcripts_tracking | select first_name from students where permanent_address_id = ( select permanent_address_id from students group by permanent_address_id having count ( * ) distinct from students )", "gold_parse": "SELECT first_name FROM Students WHERE current_address_id != permanent_address_id", "question": "What is the first name of the student whose permanent address is different from his or her current one?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT first_name FROM Students UNION SELECT first_name FROM Students", "predicted_parse_explanation": "['Step 1: find the first_name of Students table', 'Step 2: find the first_name of Students table', 'Step 3: show the rows that are in any of the results of step 1 or the results of step 2']", "feedback": "Find first name of students table , Ensure permanent address id is not equal to current address id .", "context": "What is the first name of the student whose permanent address is different from his or her current one? || select first_name from students union select first_name from students || student_transcripts_tracking | students : first_name, permanent_address_id || Find first name of students table, Ensure permanent address id is not equal to current address id.", "label": "student_transcripts_tracking | select first_name from students where current_address_id!= permanent_address_id" }, { "prediction": "student_transcripts_tracking | select student_enrolment.semester_id from student_enrolment join degree_programs on student_enrolment.student_id = degree_programs.degree_program_id where degree_programs.degree_summary_name = 'Master' intersect select student_enrolment.semester_id from student_enrolment join degree_programs on student_enrolment.student_id = degree_programs.degree_program_id where degree_programs.degree_summary_name = 'Bachelor'", "gold_parse": "SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'", "question": "Find the semester when both Master students and Bachelor students got enrolled in.", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT semester_name FROM Semesters WHERE semester_name = \"Master\" INTERSECT SELECT semester_name FROM Semesters WHERE semester_description = \"Bachelor\"", "predicted_parse_explanation": "['Step 1: find the semester_name of Semesters table for which semester_name equals Master', 'Step 2: find the semester_name of Semesters table for which semester_description equals Bachelor', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "Instead of second semester name of step 1 , semester description of step 2 use degree summary name .", "context": "Find the semester when both Master students and Bachelor students got enrolled in. || select semester_name from semesters where semester_name = 'Master' intersect select semester_name from semesters where semester_description = 'Bachelor' || student_transcripts_tracking | student_enrolment : semester_id, student_id | degree_programs : degree_program_id, degree_summary_name ( \"Bachelor\" ) || Instead of second semester name of step 1, semester description of step 2 use degree summary name.", "label": "student_transcripts_tracking | select distinct student_enrolment.semester_id from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id where degree_summary_name = 'Master' intersect select distinct student_enrolment.semester_id from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id where degree_summary_name = 'Bachelor'" }, { "prediction": "wta_1 | select winner_name, winner_rank from matches where tourney_name = 'Australian Open' order by winner_rank_points desc limit 1", "gold_parse": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1", "question": "Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT winner_name , loser_rank FROM matches ORDER BY winner_rank_points Desc LIMIT 1", "predicted_parse_explanation": "['find the winner_name, loser_rank of matches table with largest value of winner_rank_points']", "feedback": "You need to search for the winner name which is equivalent to Australian Open along with highest value of winner rank points.", "context": "Find the name of the winner who has the highest rank points and participated in the Australian Open tourney. || select winner_name, loser_rank from matches order by winner_rank_points desc limit 1 || wta_1 | matches : winner_name, winner_rank, tourney_name ( \"Australian Open\" ), winner_rank_points || You need to search for the winner name which is equivalent to Australian Open along with highest value of winner rank points.", "label": "wta_1 | select winner_name from matches where tourney_name = 'Australian Open' order by winner_rank_points desc limit 1" }, { "prediction": "wta_1 | select count ( * ) from matches", "gold_parse": "SELECT count(*) FROM matches", "question": "Count the number of matches.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM players", "predicted_parse_explanation": "['find the number of rows in players table']", "feedback": "You need to consider matches table.", "context": "Count the number of matches. || select count ( * ) from players || wta_1 | matches : || You need to consider matches table.", "label": "wta_1 | select count ( * ) from matches" }, { "prediction": "dog_kennels | select count ( professional_id ), count ( dog_id ) from treatments group by professional_id", "gold_parse": "SELECT count(DISTINCT professional_id) FROM Treatments", "question": "Find the number of professionals who have ever treated dogs.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Dogs WHERE weight = 7.57", "predicted_parse_explanation": "['find the number of rows in Dogs table whose weight equals 7.57']", "feedback": "You need to search for the rows count in treatment table.", "context": "Find the number of professionals who have ever treated dogs. || select count ( * ) from dogs where weight = 7.57 || dog_kennels | treatments : professional_id, dog_id || You need to search for the rows count in treatment table.", "label": "dog_kennels | select count ( distinct professional_id ) from treatments" }, { "prediction": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' and countrylanguage.isofficial = ( select official from country where language = 'English' )", "gold_parse": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND T2.IsOfficial = \"T\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\" AND T2.IsOfficial = \"T\"", "question": "Give the names of countries with English and French as official languages.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE Code2 = \"T\" INTERSECT SELECT Continent FROM country WHERE Code2 = \"French\"", "predicted_parse_explanation": "['Step 1: find the Continent of country table for which Code2 equals T', 'Step 2: find the Continent of country table for which Code2 equals French', 'Step 3: show the rows that are in both the results of step 1 and the results of step 2']", "feedback": "i want the name of country table having english and french language and t is official. ", "context": "Give the names of countries with English and French as official languages. || select continent from country where code2 = 'T' intersect select continent from country where code2 = 'French' || world_1 | country : name, code | countrylanguage : countrycode, language ( \"French\" ), isofficial || i want the name of country table having english and french language and t is official.", "label": "world_1 | select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and countrylanguage.isofficial = 'T' intersect select country.name from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'French' and countrylanguage.isofficial = 'T'" }, { "prediction": "museum_visit | select visitor.id, visitor.name, visitor.level_of_membership from visitor join visit on visitor.id = visit.visitor_id join museum on visit.num_of_ticket = museum.museum_id order by visit.total_spent desc limit 1", "gold_parse": "SELECT t2.visitor_id , t1.name , t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY sum(t2.Total_spent) DESC LIMIT 1", "question": "What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?", "db_id": "museum_visit", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "museum", "visitor", "visit" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "Museum_ID", "Name", "Num_of_Staff", "Open_Year", "ID", "Name", "Level_of_membership", "Age", "Museum_ID", "visitor_ID", "Num_of_Ticket", "Total_spent" ] }, "db_foreign_keys": { "column_id": [ 10, 9 ], "other_column_id": [ 5, 1 ] }, "predicted_parse_with_values": "SELECT T3.visitor_ID , T2.Name , T1.Num_of_Staff FROM museum AS T1 JOIN visitor AS T2 JOIN visit AS T3 ON T1.Museum_ID = T3.Museum_ID AND T3.visitor_ID = T2.ID AND T1.Museum_ID = T3.Museum_ID GROUP BY T3.Museum_ID ORDER BY Sum ( T3.Total_spent ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in visit table, find corresponding rows in museum table and in visitor table', \"Step 2: find the summation of Total_spent of each value of visit's Museum_ID in the results of step 1\", \"Step 3: find visitor_ID, visitor's Name, Num_of_Staff of the results of step 1 with largest value in the results of step 2\"]", "feedback": "Use level of membership in step 3 in place of num of staff.", "context": "What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets? || select visit.visitor_id, visitor.name, museum.num_of_staff from museum join visitor join visit on museum.museum_id = visit.museum_id and visit.visitor_id = visitor.id and museum.museum_id = visit.museum_id group by visit.museum_id order by sum ( visit.total_spent ) desc limit 1 || museum_visit | visitor : id, name, level_of_membership | visit : visitor_id, num_of_ticket, total_spent || Use level of membership in step 3 in place of num of staff.", "label": "museum_visit | select visit.visitor_id, visitor.name, visitor.level_of_membership from visitor join visit on visitor.id = visit.visitor_id group by visit.visitor_id order by sum ( visit.total_spent ) desc limit 1" }, { "prediction": "flight_2 | select count ( * ) from airlines join flights on airlines.uid = flights.airline join airports on flights.sourceairport = airports.city where airports.airportcode = 'ASY' and airlines.airline = 'United Airlines'", "gold_parse": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"", "question": "How many 'United Airlines' flights go to Airport 'ASY'?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"United Airlines\" AND T1.Airline = \"ASY\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in airports table', \"Step 2: find the number of rows in the results of step 1 whose airports's Country equals United Airlines and Airline equals ASY\"]", "feedback": "swap airports with flights in step 1 and use airline and destination airport.", "context": "How many 'United Airlines' flights go to Airport 'ASY'? || select count ( * ) from airlines join airports where airports.country = 'United Airlines' and airlines.airline = 'ASY' || flight_2 | airlines : uid, airline ( \"United Airlines\" ) | flights : airline, sourceairport | airports : city, airportcode ( \"ASY\" ) || swap airports with flights in step 1 and use airline and destination airport.", "label": "flight_2 | select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.destairport = 'ASY'" }, { "prediction": "network_1 | select count ( distinct friend.friend_id ) from friend join highschooler on friend.student_id = highschooler.id where highschooler.name = 'Kyle'", "gold_parse": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "question": "Count the number of friends Kyle has.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Highschooler", "predicted_parse_explanation": "['find the number of rows in Highschooler table']", "feedback": "Count the number of student id present in friend table having Highschooler name as Kyle.", "context": "Count the number of friends Kyle has. || select count ( * ) from highschooler || network_1 | friend : friend_id, student_id | highschooler : id, name ( \"Kyle\" ) || Count the number of student id present in friend table having Highschooler name as Kyle.", "label": "network_1 | select count ( * ) from friend join highschooler on friend.student_id = highschooler.id where highschooler.name = 'Kyle'" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO' except select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\"", "question": "Which airlines have departures from CVO but not from APG airports?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.Airline FROM airlines AS T1 WHERE T1.Country = \"CVO\" EXCEPT SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"APG\"", "predicted_parse_explanation": "[\"Step 1: find the Airline of airlines table for which airlines's Country equals CVO\", 'Step 2: For each row in airlines table, find the corresponding rows in airports table', \"Step 3: find Airline of the results of step 2 whose airports's Country equals APG\", 'Step 4: show the rows that are in the results of step 1 but not in the results of step 3']", "feedback": "airlines's country is wrong , exchange it with flights's source airport and airports's country with flights's source airport .", "context": "Which airlines have departures from CVO but not from APG airports? || select airlines.airline from airlines where airlines.country = 'CVO' except select airlines.airline from airlines join airports where airports.country = 'APG' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"APG\" ) || airlines's country is wrong, exchange it with flights's source airport and airports's country with flights's source airport.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO' except select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG'" }, { "prediction": "student_transcripts_tracking | select degree_program_id from student_enrolment group by degree_program_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1", "question": "Find the kind of program which most number of students are enrolled in?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name FROM Courses GROUP BY course_name ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of course_name in Courses table', 'Step 2: find course_name of Courses table with largest value in the results of step 1']", "feedback": "Search degree summary name whose degree program id is present most number of times in student enrolment table .", "context": "Find the kind of program which most number of students are enrolled in? || select course_name from courses group by course_name order by count ( * ) desc limit 1 || student_transcripts_tracking | student_enrolment : degree_program_id || Search degree summary name whose degree program id is present most number of times in student enrolment table.", "label": "student_transcripts_tracking | select degree_programs.degree_summary_name from degree_programs join student_enrolment on degree_programs.degree_program_id = student_enrolment.degree_program_id group by degree_programs.degree_summary_name order by count ( * ) desc limit 1" }, { "prediction": "dog_kennels | select treatments.cost_of_treatment, treatment_types.treatment_type_description from treatments join treatment_types on treatments.treatment_type_code = treatment_types.treatment_type_code", "gold_parse": "SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code", "question": "List the cost of each treatment and the corresponding treatment type description.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT treatment_type_description , treatment_type_code FROM Treatment_Types", "predicted_parse_explanation": "['find the treatment_type_description, treatment_type_code of Treatment_Types table']", "feedback": "Use treatments cost of treatment in place of treatment type code .", "context": "List the cost of each treatment and the corresponding treatment type description. || select treatment_type_description, treatment_type_code from treatment_types || dog_kennels | treatments : cost_of_treatment, treatment_type_code | treatment_types : treatment_type_description, treatment_type_code || Use treatments cost of treatment in place of treatment type code.", "label": "dog_kennels | select treatments.cost_of_treatment, treatment_types.treatment_type_description from treatments join treatment_types on treatments.treatment_type_code = treatment_types.treatment_type_code" }, { "prediction": "flight_2 | select count ( * ) from airlines join flights on airlines.uid = flights.airline join airports on flights.sourceairport = airports.airportcode where airports.airportname = 'ASY' and airlines.airline = 'United Airlines'", "gold_parse": "SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = \"United Airlines\" AND T2.DestAirport = \"ASY\"", "question": "Count the number of United Airlines flights arriving in ASY Airport.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"United Airlines\" AND T1.Airline = \"ASY\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in airports table', \"Step 2: find the number of rows in the results of step 1 whose airports's Country equals United Airlines and Airline equals ASY\"]", "feedback": "Add flights table in step 1 , replace airports's country and airline with airlines'Airline and destination airport respectively .", "context": "Count the number of United Airlines flights arriving in ASY Airport. || select count ( * ) from airlines join airports where airports.country = 'United Airlines' and airlines.airline = 'ASY' || flight_2 | airlines : uid, airline ( \"United Airlines\" ) | flights : airline, sourceairport | airports : airportcode, airportname ( \"ASY\" ) || Add flights table in step 1, replace airports's country and airline with airlines'Airline and destination airport respectively.", "label": "flight_2 | select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.destairport = 'ASY'" }, { "prediction": "world_1 | select population, name, headofstate from country order by surfacearea desc limit 1", "gold_parse": "SELECT Name , population , HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1", "question": "What are the population, name and leader of the country with the largest area?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT LifeExpectancy , Name , LocalName FROM country ORDER BY SurfaceArea Desc LIMIT 1", "predicted_parse_explanation": "['find the LifeExpectancy, Name, LocalName of country table with largest value of SurfaceArea']", "feedback": "i want population.", "context": "What are the population, name and leader of the country with the largest area? || select lifeexpectancy, name, localname from country order by surfacearea desc limit 1 || world_1 | country : population, name, headofstate, surfacearea || i want population.", "label": "world_1 | select name, population, headofstate from country order by surfacearea desc limit 1" }, { "prediction": "wta_1 | select avg ( rankings.player_id ), players.first_name from players join rankings on players.player_id = rankings.player_id group by players.first_name", "gold_parse": "SELECT avg(ranking) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "question": "Find the average ranking for each player and their first name.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Avg ( T2.winner_rank ) , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T1.first_name", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find each value of first_name in the results of step 1 along with the average winner_rank of the corresponding rows to each value']", "feedback": "We need to use rankings and ranking in step 1 and 2 respectively.", "context": "Find the average ranking for each player and their first name. || select avg ( matches.winner_rank ), players.first_name from players join matches on players.player_id = matches.loser_id group by players.first_name || wta_1 | players : first_name, player_id | rankings : player_id || We need to use rankings and ranking in step 1 and 2 respectively.", "label": "wta_1 | select avg ( ranking ), players.first_name from players join rankings on players.player_id = rankings.player_id group by players.first_name" }, { "prediction": "world_1 | select distinct city.name from country join country on city.countrycode = country.countrycode where country.continent = 'Asia' and countrylanguage.language = 'Chinese'", "gold_parse": "SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode JOIN city AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' AND T2.Language = 'Chinese' AND T1.Continent = \"Asia\"", "question": "Return the different names of cities that are in Asia and for which Chinese is the official language.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT DISTINCT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = \"T\" AND T2.Name = \"Chinese\"", "predicted_parse_explanation": "['Step 1: For each row in country table, find the corresponding rows in city table', \"Step 2: find without repetition city's Name of the results of step 1 whose Continent equals T and country's Name equals Chinese\"]", "feedback": "you have to use language of country and asia in place of name of country and t respectively.also make sure that is official should be t. ", "context": "Return the different names of cities that are in Asia and for which Chinese is the official language. || select distinct city.name from city join country on city.countrycode = country.code where country.continent = 'T' and country.name = 'Chinese' || world_1 | city : name, countrycode | country : code, continent ( \"Asia\" ) | countrylanguage : countrycode, language ( \"Chinese\" ) || you have to use language of country and asia in place of name of country and t respectively.also make sure that is official should be t.", "label": "world_1 | select distinct city.name from country join countrylanguage on country.code = countrylanguage.countrycode join city on country.code = city.countrycode where countrylanguage.isofficial = 'T' and countrylanguage.language = 'Chinese' and country.continent = 'Asia'" }, { "prediction": "world_1 | select city.district from city join country on city.district = country.code where city.name = 'Kabul'", "gold_parse": "SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = \"Kabul\"", "question": "What region is Kabul in?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT LocalName FROM country", "predicted_parse_explanation": "['find the LocalName of country table']", "feedback": "Swap local name with region and Verify corresponding city's name name equals Kabul .", "context": "What region is Kabul in? || select localname from country || world_1 | city : district, name ( \"Kabul\" ) | country : region, code || Swap local name with region and Verify corresponding city's name name equals Kabul.", "label": "world_1 | select region from country join city on country.code = city.countrycode where city.name = 'Kabul'" }, { "prediction": "world_1 | select country.region from country join countrylanguage on country.countrycode = countrylanguage.countrycode where countrylanguage.language = 'English' or countrylanguage.language = 'Dutch'", "gold_parse": "SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" OR T2.Language = \"Dutch\"", "question": "What are the regions that use English or Dutch?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Region FROM country WHERE Name = \"Dutch\" OR Name = \"English\"", "predicted_parse_explanation": "['find Region of country table whose Name equals English or Name equals Dutch']", "feedback": "You need to use language instead of name.", "context": "What are the regions that use English or Dutch? || select region from country where name = 'Dutch' or name = 'English' || world_1 | country : region, countrycode | countrylanguage : countrycode, language ( \"Dutch\" ) || You need to use language instead of name.", "label": "world_1 | select distinct country.region from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' or countrylanguage.language = 'Dutch'" }, { "prediction": "cre_Doc_Template_Mgt | select version_number, template_type_code from templates where template_id > 5", "gold_parse": "SELECT version_number , template_type_code FROM Templates WHERE version_number > 5", "question": "Return the version numbers and template type codes of templates with a version number greater than 5.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T1.Version_Number , T1.Template_Type_Code FROM Templates AS T1 JOIN Documents AS T2 ON T1.Template_ID = T2.Template_ID GROUP BY T2.Template_ID HAVING Count ( * ) > 5", "predicted_parse_explanation": "['Step 1: For each row in Templates table, find the corresponding rows in Documents table', \"Step 2: find the number of rows of each value of Documents's Template_ID in the results of step 1\", 'Step 3: find Version_Number, Template_Type_Code in the results of step 1 whose corresponding value in step 2 is greater than 5']", "feedback": "In step 2 just find version number .", "context": "Return the version numbers and template type codes of templates with a version number greater than 5. || select templates.version_number, templates.template_type_code from templates join documents on templates.template_id = documents.template_id group by documents.template_id having count ( * ) > 5 || cre_Doc_Template_Mgt | templates : version_number, template_type_code, template_id ( 5 ) || In step 2 just find version number.", "label": "cre_Doc_Template_Mgt | select version_number, template_type_code from templates where version_number > 5" }, { "prediction": "wta_1 | select winner_name, winner_rank from matches order by winner_id desc limit 1", "gold_parse": "SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1", "question": "Find the name and rank points of the winner who won the most times.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT tourney_name , loser_rank FROM matches GROUP BY winner_entry ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of winner_entry in matches table', 'Step 2: find tourney_name, loser_rank of matches table with largest value in the results of step 1']", "feedback": "Change tourney name , loser rank to winner name and winner rank points respectively .", "context": "Find the name and rank points of the winner who won the most times. || select tourney_name, loser_rank from matches group by winner_entry order by count ( * ) desc limit 1 || wta_1 | matches : winner_name, winner_rank, winner_id || Change tourney name, loser rank to winner name and winner rank points respectively.", "label": "wta_1 | select winner_name, winner_rank_points from matches group by winner_name order by count ( * ) desc limit 1" }, { "prediction": "wta_1 | select first_name, last_name from players where hand = 'L' order by birth_date asc", "gold_parse": "SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date", "question": "List the first and last name of all players who are left / L hand in the order of birth date.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT first_name , last_name FROM players WHERE first_name LIKE \"L\" ORDER BY birth_date Asc", "predicted_parse_explanation": "['find the first_name, last_name of players table for which first_name contains L ordered ascending by birth_date']", "feedback": "Swap first name contains L\" with \"hand equals L\".", "context": "List the first and last name of all players who are left / L hand in the order of birth date. || select first_name, last_name from players where first_name like 'L' order by birth_date asc || wta_1 | players : first_name, last_name, hand ( \"L\" ), birth_date || Swap first name contains L\" with \"hand equals L\".", "label": "wta_1 | select first_name, last_name from players where hand = 'L' order by birth_date asc" }, { "prediction": "world_1 | select language, percentage from countrylanguage group by language order by percentage desc limit 1", "gold_parse": "SELECT LANGUAGE , CountryCode , max(Percentage) FROM countrylanguage GROUP BY CountryCode", "question": "What is the language spoken by the largest percentage of people in each country?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name , Continent FROM country GROUP BY Continent ORDER BY Max ( Population ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the maximum Population of each value of Continent in country table', 'Step 2: find Name, Continent of country table with largest value in the results of step 1']", "feedback": "For each country find countrylanguage's language used by most of population in that country .", "context": "What is the language spoken by the largest percentage of people in each country? || select name, continent from country group by continent order by max ( population ) desc limit 1 || world_1 | countrylanguage : language, percentage || For each country find countrylanguage's language used by most of population in that country.", "label": "world_1 | select language, countrycode, max ( percentage ) from countrylanguage group by countrycode" }, { "prediction": "dog_kennels | select professionals.professional_id, professionals.role_code, professionals.first_name from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) >= 2", "gold_parse": "SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "question": "Which professionals have done at least two treatments? List the professional's id, role, and first name.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT professional_id , role_code , first_name FROM Professionals GROUP BY professional_id HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of professional_id in Professionals table', 'Step 2: find professional_id, role_code, first_name in Professionals table whose corresponding value in step 1 is greater than or equals 2']", "feedback": "In step 1 supplant professionals table with treatments table .", "context": "Which professionals have done at least two treatments? List the professional's id, role, and first name. || select professional_id, role_code, first_name from professionals group by professional_id having count ( * ) > = 2 || dog_kennels | professionals : professional_id, role_code, first_name | treatments : professional_id || In step 1 supplant professionals table with treatments table.", "label": "dog_kennels | select professionals.professional_id, professionals.role_code, professionals.first_name from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) >= 2" }, { "prediction": "dog_kennels | select professionals.professional_id, professionals.role_code, professionals.first_name from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) >= 2", "gold_parse": "SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2", "question": "What are the id, role, and first name of the professionals who have performed two or more treatments?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT professional_id , role_code , first_name FROM Professionals GROUP BY professional_id HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of professional_id in Professionals table', 'Step 2: find professional_id, role_code, first_name in Professionals table whose corresponding value in step 1 is greater than or equals 2']", "feedback": "In step 1 Take professional id in treatments table in place of professional id in professionals table\".", "context": "What are the id, role, and first name of the professionals who have performed two or more treatments? || select professional_id, role_code, first_name from professionals group by professional_id having count ( * ) > = 2 || dog_kennels | professionals : professional_id, role_code, first_name | treatments : professional_id || In step 1 Take professional id in treatments table in place of professional id in professionals table\".", "label": "dog_kennels | select professionals.professional_id, professionals.role_code, professionals.first_name from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) >= 2" }, { "prediction": "wta_1 | select players.country_code, players.first_name from players join matches on players.player_id = matches.winner_id where matches.turner_name = 'WTA Championships' intersect select players.country_code, players.first_name from players join matches on players.player_id = matches.winner_id where matches.turner_name = 'Australian Open'", "gold_parse": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open'", "question": "What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id WHERE T2.loser_ioc = \"WTA Championships\" INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id WHERE T2.loser_ioc = \"Australian Open\"", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find country_code, first_name of the results of step 1 whose loser_ioc equals WTA Championships', 'Step 3: find country_code, first_name of the results of step 1 whose loser_ioc equals Australian Open', 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "Use tourney name instead of loser ioc in both step 2 , step 3. Ensure player id equals winner id in both step 2 , step 3.", "context": "What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open? || select players.country_code, players.first_name from players join matches on players.player_id = matches.loser_id where matches.loser_ioc = 'WTA Championships' intersect select players.country_code, players.first_name from players join matches on players.player_id = matches.loser_id where matches.loser_ioc = 'Australian Open' || wta_1 | players : country_code, first_name, player_id | matches : winner_id, tourney_name ( \"Australian Open\" ) || Use tourney name instead of loser ioc in both step 2, step 3. Ensure player id equals winner id in both step 2, step 3.", "label": "wta_1 | select players.country_code, players.first_name from players join matches on players.player_id = matches.winner_id where matches.tourney_name = 'WTA Championships' intersect select players.country_code, players.first_name from players join matches on players.player_id = matches.winner_id where matches.tourney_name = 'Australian Open'" }, { "prediction": "wta_1 | select count ( * ) from matches where year = 2013 or year = 2016", "gold_parse": "SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016", "question": "List the number of all matches who played in years of 2013 or 2016.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM matches WHERE year > = 2013", "predicted_parse_explanation": "['find the number of rows in matches table whose year greater than or equals 2013']", "feedback": "Not greater than or equals 2013 but equals 2013 or 2016.", "context": "List the number of all matches who played in years of 2013 or 2016. || select count ( * ) from matches where year > = 2013 || wta_1 | matches : year ( 2013, 2016 ) || Not greater than or equals 2013 but equals 2013 or 2016.", "label": "wta_1 | select count ( * ) from matches where year = 2013 or year = 2016" }, { "prediction": "real_estate_properties | select ref_feature_types.feature_type_name from other_available_features join ref_feature_types on other_available_features.feature_id = ref_feature_types.feature_type_code where other_available_features.feature_name = 'AirCon'", "gold_parse": "SELECT T2.feature_type_name FROM Other_Available_Features AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code = T2.feature_type_code WHERE T1.feature_name = \"AirCon\"", "question": "What is the feature type name of feature AirCon?", "db_id": "real_estate_properties", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Feature_Types", "Ref_Property_Types", "Other_Available_Features", "Properties", "Other_Property_Features" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4 ], "column_name": [ "*", "feature_type_code", "feature_type_name", "property_type_code", "property_type_description", "feature_id", "feature_type_code", "feature_name", "feature_description", "property_id", "property_type_code", "date_on_market", "date_sold", "property_name", "property_address", "room_count", "vendor_requested_price", "buyer_offered_price", "agreed_selling_price", "apt_feature_1", "apt_feature_2", "apt_feature_3", "fld_feature_1", "fld_feature_2", "fld_feature_3", "hse_feature_1", "hse_feature_2", "hse_feature_3", "oth_feature_1", "oth_feature_2", "oth_feature_3", "shp_feature_1", "shp_feature_2", "shp_feature_3", "other_property_details", "property_id", "feature_id", "property_feature_description" ] }, "db_foreign_keys": { "column_id": [ 6, 10, 35, 36 ], "other_column_id": [ 1, 3, 9, 5 ] }, "predicted_parse_with_values": "SELECT feature_type_name FROM Ref_Feature_Types", "predicted_parse_explanation": "['find the feature_type_name of Ref_Feature_Types table']", "feedback": "Make sure to search for whose similar name of feature equivalent to AirCon.", "context": "What is the feature type name of feature AirCon? || select feature_type_name from ref_feature_types || real_estate_properties | ref_feature_types : feature_type_name, feature_type_code | other_available_features : feature_id, feature_name ( \"AirCon\" ) || Make sure to search for whose similar name of feature equivalent to AirCon.", "label": "real_estate_properties | select ref_feature_types.feature_type_name from other_available_features join ref_feature_types on other_available_features.feature_type_code = ref_feature_types.feature_type_code where other_available_features.feature_name = 'AirCon'" }, { "prediction": "student_transcripts_tracking | select count ( * ) from courses", "gold_parse": "SELECT count(*) FROM Courses", "question": "How many courses in total are listed?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Addresses", "predicted_parse_explanation": "['find the number of rows in Addresses table']", "feedback": "Substitute addresses table with courses table .", "context": "How many courses in total are listed? || select count ( * ) from addresses || student_transcripts_tracking | courses : || Substitute addresses table with courses table.", "label": "student_transcripts_tracking | select count ( * ) from courses" }, { "prediction": "tvshow | select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.id where cartoon.directed_by = 'Ben Jones' intersect select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.id where cartoon.directed_by = 'Michael Chang'", "gold_parse": "SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'", "question": "What is the series name and country of all TV channels that are playing cartoons directed by Ben Jones and cartoons directed by Michael Chang?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.series_name , T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = \"Ben Jones\" AND T2.Directed_by = \"Michael Chang\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find the corresponding rows in Cartoon table', 'Step 2: find series_name, Country of the results of step 1 whose Written_by equals Ben Jones and Directed_by equals Michael Chang']", "feedback": "You need to utilize written by instead of directed by.", "context": "What is the series name and country of all TV channels that are playing cartoons directed by Ben Jones and cartoons directed by Michael Chang? || select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.written_by = 'Ben Jones' and cartoon.directed_by = 'Michael Chang' || tvshow | tv_channel : series_name, country, id | cartoon : id, directed_by ( \"Michael Chang\" ) || You need to utilize written by instead of directed by.", "label": "tvshow | select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Michael Chang' intersect select tv_channel.series_name, tv_channel.country from tv_channel join cartoon on tv_channel.id = cartoon.channel where cartoon.directed_by = 'Ben Jones'" }, { "prediction": "dog_kennels | select breeds.breed_name from dogs join breeds on dogs.breed_code = breeds.breed_code group by breeds.breed_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1", "question": "Which breed do the most dogs have? Give me the breed name.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT breed_name FROM Breeds GROUP BY breed_name ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of breed_name in Breeds table', 'Step 2: find breed_name of Breeds table with largest value in the results of step 1']", "feedback": "In step 1, I want code of breed and table of dogs.", "context": "Which breed do the most dogs have? Give me the breed name. || select breed_name from breeds group by breed_name order by count ( * ) desc limit 1 || dog_kennels | breeds : breed_name, breed_code | dogs : breed_code || In step 1, I want code of breed and table of dogs.", "label": "dog_kennels | select breeds.breed_name from breeds join dogs on breeds.breed_code = dogs.breed_code group by breeds.breed_name order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select sum ( population ), max ( gnp ) from country where continent = 'Asia'", "gold_parse": "SELECT sum(Population) , max(GNP) FROM country WHERE Continent = \"Asia\"", "question": "What is the total population and maximum GNP in Asia?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Sum ( Population ) , Max ( GNP ) FROM country", "predicted_parse_explanation": "['find the summation of Population and the maximum GNP in country table']", "feedback": "Need to specify continent equals Asia .", "context": "What is the total population and maximum GNP in Asia? || select sum ( population ), max ( gnp ) from country || world_1 | country : population, gnp, continent ( \"Asia\" ) || Need to specify continent equals Asia.", "label": "world_1 | select sum ( population ), max ( gnp ) from country where continent = 'Asia'" }, { "prediction": "cre_Doc_Template_Mgt | select templates.template_type_code from documents join templates on documents.template_id = templates.template_id group by templates.template_type_code order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1", "question": "Return the code of the template type that is most commonly used in documents.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_Type_Code FROM Templates GROUP BY Template_Type_Code ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Template_Type_Code in Templates table', 'Step 2: find Template_Type_Code of Templates table with largest value in the results of step 1']", "feedback": "Ensure that template type code used in documents .", "context": "Return the code of the template type that is most commonly used in documents. || select template_type_code from templates group by template_type_code order by count ( * ) desc limit 1 || cre_Doc_Template_Mgt | templates : template_type_code | documents : template_id || Ensure that template type code used in documents.", "label": "cre_Doc_Template_Mgt | select templates.template_type_code from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code order by count ( * ) desc limit 1" }, { "prediction": "employee_hire_evaluation | select * from hiring", "gold_parse": "SELECT * FROM hiring", "question": "Give me all the information about hiring.", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT * FROM employee", "predicted_parse_explanation": "['find the rows of employee table']", "feedback": "You need to utilize hiring table.", "context": "Give me all the information about hiring. || select * from employee || employee_hire_evaluation | hiring : || You need to utilize hiring table.", "label": "employee_hire_evaluation | select * from hiring" }, { "prediction": "flight_2 | select flights.flightno from airlines join flights on airlines.uid = flights.airline where airlines.airline = 'United Airlines'", "gold_parse": "SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = \"United Airlines\"", "question": "What are flight numbers of Airline \"United Airlines\"?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T2.FlightNo FROM airlines AS T1 JOIN flights AS T2 WHERE T1.Airline = \"United Airlines\" AND T1.Country = \"USA\"", "predicted_parse_explanation": "['Step 1: For each row in airlines table, find the corresponding rows in flights table', \"Step 2: find FlightNo of the results of step 1 whose airlines's Airline equals United Airlines and Country equals USA\"]", "feedback": "Omit \"and country equals USA\".", "context": "What are flight numbers of Airline \"United Airlines\"? || select flights.flightno from airlines join flights where airlines.airline = 'United Airlines' and airlines.country = 'USA' || flight_2 | flights : flightno, airline | airlines : uid, airline ( \"United Airlines\" ) || Omit \"and country equals USA\".", "label": "flight_2 | select flights.flightno from flights join airlines on airlines.uid = flights.airline where airlines.airline = 'United Airlines'" }, { "prediction": "car_1 | select countries.countryname from countries join car_makers on countries.countryid = car_makers.country join continents on car_makers.id = continents.continent where continents.continent = 'Europe' group by countries.countryname having count ( * ) >= 3", "gold_parse": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING count(*) >= 3", "question": "What are the names of all European countries with at least 3 manufacturers?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT T1.CountryName FROM countries AS T1 JOIN car_makers AS T2 ON T1.CountryId = T2.Country GROUP BY T2.Country HAVING Count ( * ) > = 3", "predicted_parse_explanation": "['Step 1: For each row in countries table, find the corresponding rows in car_makers table', 'Step 2: find the number of rows of each value of Country in the results of step 1', 'Step 3: find CountryName in the results of step 1 whose corresponding value in step 2 is greater than or equals 3']", "feedback": "make sure only to find for which continents continent equals europe .", "context": "What are the names of all European countries with at least 3 manufacturers? || select countries.countryname from countries join car_makers on countries.countryid = car_makers.country group by car_makers.country having count ( * ) > = 3 || car_1 | countries : countryname, countryid | car_makers : country, id | continents : continent ( \"Europe\" ) || make sure only to find for which continents continent equals europe.", "label": "car_1 | select countries.countryname from countries join continents on countries.continent = continents.contid join car_makers on countries.countryid = car_makers.country where continents.continent = 'europe' group by countries.countryname having count ( * ) >= 3" }, { "prediction": "world_1 | select countrycode from countrylanguage where language = 'English' or language = 'Dutch' isofficial", "gold_parse": "SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" AND IsOfficial = \"T\" UNION SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"Dutch\" AND IsOfficial = \"T\"", "question": "What are the countries where either English or Dutch is the official language?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE LocalName = \"T\" OR LocalName = \"Dutch\"", "predicted_parse_explanation": "['find Continent of country table whose LocalName equals Dutch or LocalName equals T']", "feedback": "Replace continent with name name , local name with language and ensure is official equals T .", "context": "What are the countries where either English or Dutch is the official language? || select continent from country where localname = 'T' or localname = 'Dutch' || world_1 | countrylanguage : countrycode, language ( \"Dutch\" ), isofficial || Replace continent with name name, local name with language and ensure is official equals T.", "label": "world_1 | select * from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'English' and isofficial = 'T' union select * from country join countrylanguage on country.code = countrylanguage.countrycode where countrylanguage.language = 'Dutch' and isofficial = 'T'" }, { "prediction": "cre_Doc_Template_Mgt | select template_type_code from templates except select templates.template_type_code from documents join templates on documents.template_id = templates.template_id", "gold_parse": "SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id", "question": "What are the codes of template types that are not used for any document?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T1.Template_Type_Code FROM Ref_Template_Types AS T1 EXCEPT SELECT T2.Template_Type_Code FROM Templates AS T2", "predicted_parse_explanation": "['Step 1: find the Template_Type_Code of Ref_Template_Types table', 'Step 2: find the Template_Type_Code of Templates table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "The template id of each template type code are there in document table in step 2.", "context": "What are the codes of template types that are not used for any document? || select ref_template_types.template_type_code from ref_template_types except select templates.template_type_code from templates as templates || cre_Doc_Template_Mgt | templates : template_type_code | documents : template_id || The template id of each template type code are there in document table in step 2.", "label": "cre_Doc_Template_Mgt | select template_type_code from templates except select template_type_code from templates join documents on templates.template_id = documents.template_id" }, { "prediction": "tvshow | select weekly_rank from tv_series where episode = 'A Love of a Lifetime'", "gold_parse": "SELECT Weekly_Rank FROM TV_series WHERE Episode = \"A Love of a Lifetime\"", "question": "What is the weekly rank for the episode \"A Love of a Lifetime\"?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT T2.Weekly_Rank FROM TV_Channel AS T1 JOIN TV_series AS T2 ON T2.Channel = T1.id JOIN Cartoon AS T3 ON T1.id = T3.Channel WHERE T3.Title = \"A Love of a Lifetime\"", "predicted_parse_explanation": "['Step 1: For each row in TV_Channel table, find corresponding rows in TV_series table and in Cartoon table', 'Step 2: find Weekly_Rank of the results of step 1 whose Title equals A Love of a Lifetime']", "feedback": "Title should be replaced with episode.", "context": "What is the weekly rank for the episode \"A Love of a Lifetime\"? || select tv_series.weekly_rank from tv_channel join tv_series on tv_series.channel = tv_channel.id join cartoon on tv_channel.id = cartoon.channel where cartoon.title = 'A Love of a Lifetime' || tvshow | tv_series : weekly_rank, episode ( \"A Love of a Lifetime\" ) || Title should be replaced with episode.", "label": "tvshow | select weekly_rank from tv_series where episode = 'A Love of a Lifetime'" }, { "prediction": "dog_kennels | select owners.first_name, owners.last_name, dogs.size_code from owners join dogs on owners.owner_id = dogs.owner_id", "gold_parse": "SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "question": "What are each owner's first name, last name, and the size of their dog?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT first_name , last_name , owner_id FROM Owners", "predicted_parse_explanation": "['find the first_name, last_name, owner_id of Owners table']", "feedback": "Have to substitute owner id with corresponding size code of dogs table .", "context": "What are each owner's first name, last name, and the size of their dog? || select first_name, last_name, owner_id from owners || dog_kennels | owners : first_name, last_name, owner_id | dogs : size_code, owner_id || Have to substitute owner id with corresponding size code of dogs table.", "label": "dog_kennels | select owners.first_name, owners.last_name, dogs.size_code from owners join dogs on owners.owner_id = dogs.owner_id" }, { "prediction": "network_1 | select grade from highschooler group by grade having count ( * ) >= 4", "gold_parse": "SELECT grade FROM Highschooler GROUP BY grade HAVING count(*) >= 4", "question": "Which grades have 4 or more high schoolers?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT grade FROM Highschooler WHERE grade = 9 OR grade = 4", "predicted_parse_explanation": "['find grade of Highschooler table whose grade equals 4 or grade equals 9']", "feedback": "Find grade whose name count for each grade is greater than or equals to 4.", "context": "Which grades have 4 or more high schoolers? || select grade from highschooler where grade = 9 or grade = 4 || network_1 | highschooler : grade || Find grade whose name count for each grade is greater than or equals to 4.", "label": "network_1 | select grade from highschooler group by grade having count ( * ) >= 4" }, { "prediction": "network_1 | select count ( * ), highschooler.name from highschooler join likes on highschooler.id = likes.student_id group by highschooler.name", "gold_parse": "SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "question": "What are the names of high schoolers who have likes, and how many likes does each have?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , grade FROM Highschooler GROUP BY grade", "predicted_parse_explanation": "['find each value of grade in Highschooler table along with the number of the corresponding rows to each value']", "feedback": "Change grade with name , Find number of the corresponding rows to Highschooler's id in likes table .", "context": "What are the names of high schoolers who have likes, and how many likes does each have? || select count ( * ), grade from highschooler group by grade || network_1 | highschooler : name, id | likes : student_id || Change grade with name, Find number of the corresponding rows to Highschooler's id in likes table.", "label": "network_1 | select highschooler.name, count ( * ) from likes join highschooler on likes.student_id = highschooler.id group by likes.student_id" }, { "prediction": "wta_1 | select players.first_name, players.country_code from players join rankings on players.player_id = rankings.player_id order by rankings.tours desc limit 1", "gold_parse": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1", "question": "What is the first name and country code of the player with the most tours?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.country_code FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T2.loser_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find the number of rows of each value of loser_id in the results of step 1', 'Step 3: find first_name, country_code of step 1 results with largest value in the results of step 2']", "feedback": "In step 1, You need use rankings table , In step 2 , Use tours.", "context": "What is the first name and country code of the player with the most tours? || select players.first_name, players.country_code from players join matches on players.player_id = matches.loser_id group by matches.loser_id order by count ( * ) desc limit 1 || wta_1 | players : first_name, country_code, player_id | rankings : player_id, tours || In step 1, You need use rankings table, In step 2, Use tours.", "label": "wta_1 | select players.country_code, players.first_name from players join rankings on players.player_id = rankings.player_id order by rankings.tours desc limit 1" }, { "prediction": "flight_2 | select count ( * ) from airports join flights on airports.city = flights.sourceairport and flights.airport = flights.airport where airports.city = 'Aberdeen' and airports.airportname = 'Ashley'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = \"Ashley\" AND T3.City = \"Aberdeen\"", "question": "How many flights fly from Aberdeen to Ashley?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines WHERE Airline = \"Aberdeen\" AND Airline = \"Ashley\"", "predicted_parse_explanation": "['find the number of rows in airlines table whose Airline equals Ashley and Airline equals Aberdeen']", "feedback": "swap between airlines and flights table and 1st and 2nd airline with source airport.", "context": "How many flights fly from Aberdeen to Ashley? || select count ( * ) from airlines where airline = 'Aberdeen' and airline = 'Ashley' || flight_2 | airports : city ( \"Aberdeen\" ), airportname ( \"Ashley\" ) | flights : sourceairport, airline || swap between airlines and flights table and 1st and 2nd airline with source airport.", "label": "flight_2 | select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airports on flights.sourceairport = airports.airportcode where airports.city = 'Ashley' and airports.city = 'Aberdeen'" }, { "prediction": "cre_Doc_Template_Mgt | select document_id, count ( * ) from paragraphs group by document_id order by count ( * ) asc", "gold_parse": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", "question": "Return the different document ids along with the number of paragraphs corresponding to each, ordered by id.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID , Count ( * ) FROM Paragraphs GROUP BY Document_ID ORDER BY Count ( * ) Asc", "predicted_parse_explanation": "['Step 1: for each value of Document_ID in Paragraphs table, calculate number of rows', 'Step 2: show each value of Document_ID in Paragraphs table along with the corresponding number of rows ordered ascending by the results of step 1']", "feedback": "Make sure to arrange ID of document.", "context": "Return the different document ids along with the number of paragraphs corresponding to each, ordered by id. || select document_id, count ( * ) from paragraphs group by document_id order by count ( * ) asc || cre_Doc_Template_Mgt | paragraphs : document_id || Make sure to arrange ID of document.", "label": "cre_Doc_Template_Mgt | select document_id, count ( * ) from paragraphs group by document_id order by document_id asc" }, { "prediction": "pets_1 | select count ( * ), student.stuid from student join has_pet on student.stuid = has_pet.stuid group by student.stuid", "gold_parse": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid", "question": "Find the number of pets for each student who has any pet and student id.", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Student", "predicted_parse_explanation": "['find the number of rows in Student table']", "feedback": "Find student id in has pet table with corresponding number of rows of each value .", "context": "Find the number of pets for each student who has any pet and student id. || select count ( * ) from student || pets_1 | student : stuid | has_pet : stuid || Find student id in has pet table with corresponding number of rows of each value.", "label": "pets_1 | select count ( * ), student.stuid from student join has_pet on student.stuid = has_pet.stuid group by student.stuid" }, { "prediction": "wta_1 | select players.first_name, players.country_code from players join rankings on players.player_id = rankings.player_id order by rankings.tours desc limit 1", "gold_parse": "SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1", "question": "What is the first name and country code of the player with the most tours?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.country_code FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T2.loser_id ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find the number of rows of each value of loser_id in the results of step 1', 'Step 3: find first_name, country_code of step 1 results with largest value in the results of step 2']", "feedback": "Change matches table with rankings table in step 1 , loser id with tours in step 2.", "context": "What is the first name and country code of the player with the most tours? || select players.first_name, players.country_code from players join matches on players.player_id = matches.loser_id group by matches.loser_id order by count ( * ) desc limit 1 || wta_1 | players : first_name, country_code, player_id | rankings : player_id, tours || Change matches table with rankings table in step 1, loser id with tours in step 2.", "label": "wta_1 | select players.country_code, players.first_name from players join rankings on players.player_id = rankings.player_id order by rankings.tours desc limit 1" }, { "prediction": "world_1 | select avg ( lifeexpectancy ) from country where governmentform = 'Republic' and continent = 'Africa'", "gold_parse": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", "question": "Give the average life expectancy for countries in Africa which are republics?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( GNPOld ) FROM country WHERE Continent = \"Africa\"", "predicted_parse_explanation": "['find the average GNPOld in country table whose Continent equals Africa']", "feedback": "you should substitute life expectancy in place of gnp old and verify that only republic government is being used. ", "context": "Give the average life expectancy for countries in Africa which are republics? || select avg ( gnpold ) from country where continent = 'Africa' || world_1 | country : lifeexpectancy, governmentform ( \"Republic\" ), continent ( \"Africa\" ) || you should substitute life expectancy in place of gnp old and verify that only republic government is being used.", "label": "world_1 | select avg ( lifeexpectancy ) from country where continent = 'Africa' and governmentform = 'Republic'" }, { "prediction": "wta_1 | select winner_name, winner_rank from matches order by winner_age asc limit 3", "gold_parse": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3", "question": "What are the names and ranks of the three youngest winners across all matches?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT tourney_name , winner_rank FROM matches ORDER BY loser_age Asc LIMIT 3", "predicted_parse_explanation": "['Step 1: find the tourney_name, winner_rank of matches table ordered ascending by loser_age', 'Step 2: only show the first 3 rows of the results']", "feedback": "we should add winner name and winner age.", "context": "What are the names and ranks of the three youngest winners across all matches? || select tourney_name, winner_rank from matches order by loser_age asc limit 3 || wta_1 | matches : winner_name, winner_rank, winner_age || we should add winner name and winner age.", "label": "wta_1 | select distinct winner_name, winner_rank from matches order by winner_age asc limit 3" }, { "prediction": "world_1 | select name from country where continent = 'Asia' and population > 103000", "gold_parse": "SELECT Name FROM country WHERE Continent = \"Asia\" AND population > (SELECT max(population) FROM country WHERE Continent = \"Africa\")", "question": "Which Asian countries have a population that is larger than any country in Africa?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Name FROM country WHERE Continent = \"Asia\" AND Population > 103000", "predicted_parse_explanation": "['find Name of country table whose Continent equals Asia and Population greater than 103000']", "feedback": "population should be more than africa's population of 103000.", "context": "Which Asian countries have a population that is larger than any country in Africa? || select name from country where continent = 'Asia' and population > 103000 || world_1 | country : name, continent ( \"Africa\" ), population || population should be more than africa's population of 103000.", "label": "world_1 | select name from country where continent = 'Asia' and population > ( select max ( population ) from country where continent = 'Africa' )" }, { "prediction": "wta_1 | select winner_name, winner_rank from matches order by winner_age asc limit 3", "gold_parse": "SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3", "question": "Find the name and rank of the 3 youngest winners across all matches.", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT tourney_name , loser_rank FROM matches ORDER BY loser_age Asc LIMIT 3", "predicted_parse_explanation": "['Step 1: find the tourney_name, loser_rank of matches table ordered ascending by loser_age', 'Step 2: only show the first 3 rows of the results']", "feedback": "I want name of winner, winner rank and age of winner.", "context": "Find the name and rank of the 3 youngest winners across all matches. || select tourney_name, loser_rank from matches order by loser_age asc limit 3 || wta_1 | matches : winner_name, winner_rank, winner_age || I want name of winner, winner rank and age of winner.", "label": "wta_1 | select distinct winner_name, winner_rank from matches order by winner_age asc limit 3" }, { "prediction": "world_1 | select name from country where population < ( select min ( population ) from country where continent = 'Africa' )", "gold_parse": "SELECT Name FROM country WHERE Continent = \"Africa\" AND population < (SELECT min(population) FROM country WHERE Continent = \"Asia\")", "question": "Which African countries have a smaller population than that of any country in Asia?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT GovernmentForm FROM country WHERE Population < ( SELECT Population FROM country WHERE Continent = \"Africa\" )", "predicted_parse_explanation": "['Step 1: find the Population of country table for which Continent equals Africa', 'Step 2: find the GovernmentForm of country table whose Population less than the results of step 1']", "feedback": "In step 1 Switch Africa with Asia , In step 2 Switch government form with name .", "context": "Which African countries have a smaller population than that of any country in Asia? || select governmentform from country where population < ( select population from country where continent = 'Africa' ) || world_1 | country : name, population, continent ( \"Asia\" ) || In step 1 Switch Africa with Asia, In step 2 Switch government form with name.", "label": "world_1 | select name from country where continent = 'Africa' and population < ( select min ( population ) from country where continent = 'Asia' )" }, { "prediction": "world_1 | select avg ( lifeexpectancy ) from country where governmentform = 'Republic' and continent = 'Africa'", "gold_parse": "SELECT avg(LifeExpectancy) FROM country WHERE Continent = \"Africa\" AND GovernmentForm = \"Republic\"", "question": "What is the average life expectancy in African countries that are republics?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( LifeExpectancy ) FROM country WHERE Continent = \"Africa\"", "predicted_parse_explanation": "['find the average LifeExpectancy in country table whose Continent equals Africa']", "feedback": "Accept that in their government form those countries are stated as republic.", "context": "What is the average life expectancy in African countries that are republics? || select avg ( lifeexpectancy ) from country where continent = 'Africa' || world_1 | country : lifeexpectancy, governmentform ( \"Republic\" ), continent ( \"Africa\" ) || Accept that in their government form those countries are stated as republic.", "label": "world_1 | select avg ( lifeexpectancy ) from country where continent = 'Africa' and governmentform = 'Republic'" }, { "prediction": "employee_hire_evaluation | select shop.name, count ( * ) from hiring join shop on hiring.shop_id = shop.shop_id group by hiring.employee_id", "gold_parse": "SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name", "question": "For each shop, return the number of employees working there and the name of the shop.", "db_id": "employee_hire_evaluation", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "employee", "shop", "hiring", "evaluation" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3 ], "column_name": [ "*", "Employee_ID", "Name", "Age", "City", "Shop_ID", "Name", "Location", "District", "Number_products", "Manager_name", "Shop_ID", "Employee_ID", "Start_from", "Is_full_time", "Employee_ID", "Year_awarded", "Bonus" ] }, "db_foreign_keys": { "column_id": [ 12, 11, 15 ], "other_column_id": [ 1, 5, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) , T1.Name FROM shop AS T1 JOIN hiring AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T2.Shop_ID", "predicted_parse_explanation": "['Step 1: For each row in shop table, find the corresponding rows in hiring table', \"Step 2: find each value of hiring's Shop_ID in the results of step 1 along with the number of the corresponding rows to each value\"]", "feedback": "I want to find name in step 2.", "context": "For each shop, return the number of employees working there and the name of the shop. || select count ( * ), shop.name from shop join hiring on shop.shop_id = hiring.shop_id group by hiring.shop_id || employee_hire_evaluation | shop : name, shop_id | hiring : shop_id, employee_id || I want to find name in step 2.", "label": "employee_hire_evaluation | select count ( * ), shop.name from hiring join shop on hiring.shop_id = shop.shop_id group by shop.name" }, { "prediction": "course_teach | select count ( * ) from teacher", "gold_parse": "SELECT count(*) FROM teacher", "question": "What is the total count of teachers?", "db_id": "course_teach", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "course", "teacher", "course_arrange" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2 ], "column_name": [ "*", "Course_ID", "Staring_Date", "Course", "Teacher_ID", "Name", "Age", "Hometown", "Course_ID", "Teacher_ID", "Grade" ] }, "db_foreign_keys": { "column_id": [ 9, 8 ], "other_column_id": [ 4, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM course", "predicted_parse_explanation": "['find the number of rows in course table']", "feedback": "Swap between course and teacher table.", "context": "What is the total count of teachers? || select count ( * ) from course || course_teach | teacher : || Swap between course and teacher table.", "label": "course_teach | select count ( * ) from teacher" }, { "prediction": "student_transcripts_tracking | select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id group by courses.course_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1", "question": "What is the name of the course with the most students enrolled?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT course_name FROM Courses GROUP BY course_name ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of course_name in Courses table', 'Step 2: find course_name of Courses table with largest value in the results of step 1']", "feedback": "In step 1 , there should be course id of student enrolment courses table , not course name in courses table .", "context": "What is the name of the course with the most students enrolled? || select course_name from courses group by course_name order by count ( * ) desc limit 1 || student_transcripts_tracking | courses : course_name, course_id | student_enrolment_courses : course_id || In step 1, there should be course id of student enrolment courses table, not course name in courses table.", "label": "student_transcripts_tracking | select courses.course_name from courses join student_enrolment_courses on courses.course_id = student_enrolment_courses.course_id group by courses.course_name order by count ( * ) desc limit 1" }, { "prediction": "museum_visit | select visitor.name from visitor join visit on visitor.id = visit.visitor_id join museum on visit.museum_id = museum.museum_id where museum.open_year < 2009 intersect select visitor.name from visitor join visit on visitor.id = visit.visitor_id join museum on visit.museum_id = museum.museum_id where museum.open_year > 2011", "gold_parse": "SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year < 2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year > 2011", "question": "What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011?", "db_id": "museum_visit", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "museum", "visitor", "visit" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "Museum_ID", "Name", "Num_of_Staff", "Open_Year", "ID", "Name", "Level_of_membership", "Age", "Museum_ID", "visitor_ID", "Num_of_Ticket", "Total_spent" ] }, "db_foreign_keys": { "column_id": [ 10, 9 ], "other_column_id": [ 5, 1 ] }, "predicted_parse_with_values": "SELECT T2.Name FROM museum AS T1 JOIN visitor AS T2 JOIN visit AS T3 ON T1.Museum_ID = T3.Museum_ID AND T3.visitor_ID = T2.ID WHERE T1.Open_Year > 2009 INTERSECT SELECT T2.Name FROM museum AS T1 JOIN visitor AS T2 JOIN visit AS T3 ON T1.Museum_ID = T3.Museum_ID AND T3.visitor_ID = T2.ID WHERE T1.Open_Year < 2011", "predicted_parse_explanation": "['Step 1: For each row in visit table, find corresponding rows in museum table and in visitor table', \"Step 2: find visitor's Name of the results of step 1 whose Open_Year greater than 2009\", \"Step 3: find visitor's Name of the results of step 1 whose Open_Year less than 2011\", 'Step 4: show the rows that are in both the results of step 2 and the results of step 3']", "feedback": "Ensure that open year less than 2009 in step 2 , Make sure open year greater than 2011 in step 3.", "context": "What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011? || select visitor.name from museum join visitor join visit on museum.museum_id = visit.museum_id and visit.visitor_id = visitor.id where museum.open_year > 2009 intersect select visitor.name from museum join visitor join visit on museum.museum_id = visit.museum_id and visit.visitor_id = visitor.id where museum.open_year < 2011 || museum_visit | visitor : name, id | visit : visitor_id, museum_id | museum : museum_id, open_year ( 2011 ) || Ensure that open year less than 2009 in step 2, Make sure open year greater than 2011 in step 3.", "label": "museum_visit | select visitor.name from visitor join visit on visitor.id = visit.visitor_id join museum on museum.museum_id = visit.museum_id where museum.open_year < 2009 intersect select visitor.name from visitor join visit on visitor.id = visit.visitor_id join museum on museum.museum_id = visit.museum_id where museum.open_year > 2011" }, { "prediction": "cre_Doc_Template_Mgt | select templates.template_type_code from documents join templates on documents.template_id = templates.template_id group by templates.template_type_code order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1", "question": "Return the code of the template type that is most commonly used in documents.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Template_Type_Code FROM Templates GROUP BY Template_Type_Code ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Template_Type_Code in Templates table', 'Step 2: find Template_Type_Code of Templates table with largest value in the results of step 1']", "feedback": "Make sure we use template type code in documents.", "context": "Return the code of the template type that is most commonly used in documents. || select template_type_code from templates group by template_type_code order by count ( * ) desc limit 1 || cre_Doc_Template_Mgt | templates : template_type_code | documents : template_id || Make sure we use template type code in documents.", "label": "cre_Doc_Template_Mgt | select templates.template_type_code from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code order by count ( * ) desc limit 1" }, { "prediction": "dog_kennels | select professionals.professional_id, professionals.first_name, professionals.last_name, professionals.cell_number from professionals join treatments on professionals.professional_id = treatments.professional_id where professionals.state = 'Indiana' group by professionals.professional_id having count ( * ) > 2", "gold_parse": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2", "question": "Find the id, last name and cell phone of the professionals who live in the state of Indiana or have performed more than two treatments.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = \"Indiana\" UNION SELECT professional_id , last_name , cell_number FROM Professionals GROUP BY professional_id HAVING Count ( * ) > 2", "predicted_parse_explanation": "['Step 1: find the professional_id, last_name, cell_number of Professionals table for which state equals Indiana', 'Step 2: find the number of rows of each value of professional_id in Professionals table', 'Step 3: find professional_id, last_name, cell_number in Professionals table whose corresponding value in step 2 is greater than 2', 'Step 4: show the rows that are in any of the results of step 1 or the results of step 3']", "feedback": "Replace professionals table with treatments table in step 2.", "context": "Find the id, last name and cell phone of the professionals who live in the state of Indiana or have performed more than two treatments. || select professional_id, last_name, cell_number from professionals where state = 'Indiana' union select professional_id, last_name, cell_number from professionals group by professional_id having count ( * ) > 2 || dog_kennels | professionals : professional_id, first_name, last_name, cell_number, state ( \"Indiana\" ) | treatments : professional_id || Replace professionals table with treatments table in step 2.", "label": "dog_kennels | select professional_id, last_name, cell_number from professionals where state = 'Indiana' union select professionals.professional_id, professionals.last_name, professionals.cell_number from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) > 2" }, { "prediction": "cre_Doc_Template_Mgt | select document_id, count ( * ) from paragraphs group by document_id order by count ( * ) asc", "gold_parse": "SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id", "question": "Show all document ids and the number of paragraphs in each document. Order by document id.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Document_ID , Count ( * ) FROM Paragraphs GROUP BY Document_ID ORDER BY Count ( * ) Asc", "predicted_parse_explanation": "['Step 1: for each value of Document_ID in Paragraphs table, calculate number of rows', 'Step 2: show each value of Document_ID in Paragraphs table along with the corresponding number of rows ordered ascending by the results of step 1']", "feedback": "Make sure to arrange Id of documents.", "context": "Show all document ids and the number of paragraphs in each document. Order by document id. || select document_id, count ( * ) from paragraphs group by document_id order by count ( * ) asc || cre_Doc_Template_Mgt | paragraphs : document_id || Make sure to arrange Id of documents.", "label": "cre_Doc_Template_Mgt | select document_id, count ( * ) from paragraphs group by document_id order by document_id asc" }, { "prediction": "car_1 | select count ( * ) from cars_data where horsepower > 150", "gold_parse": "SELECT count(*) FROM CARS_DATA WHERE horsepower > 150", "question": "What is the number of cars with a horsepower greater than 150?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM cars_data WHERE Accelerate > 150", "predicted_parse_explanation": "['find the number of rows in cars_data table whose Accelerate greater than 150']", "feedback": "Exchange accelerate with horsepower .", "context": "What is the number of cars with a horsepower greater than 150? || select count ( * ) from cars_data where accelerate > 150 || car_1 | cars_data : horsepower ( 150 ) || Exchange accelerate with horsepower.", "label": "car_1 | select count ( * ) from cars_data where horsepower > 150" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from templates where template_type_code = 'CV'", "gold_parse": "SELECT count(*) FROM Templates WHERE template_type_code = \"CV\"", "question": "Count the number of templates of the type CV.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "Also add template type code equals CV .", "context": "Count the number of templates of the type CV. || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | templates : template_type_code ( \"CV\" ) || Also add template type code equals CV.", "label": "cre_Doc_Template_Mgt | select count ( * ) from templates where template_type_code = 'CV'" }, { "prediction": "dog_kennels | select breeds.breed_name from dogs join breeds on dogs.breed_code = breeds.breed_code group by breeds.breed_name order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1", "question": "Which breed do the most dogs have? Give me the breed name.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT breed_name FROM Breeds GROUP BY breed_name ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of breed_name in Breeds table', 'Step 2: find breed_name of Breeds table with largest value in the results of step 1']", "feedback": "Exchange breed name with breed code and breeds table with dogs table in step 1.", "context": "Which breed do the most dogs have? Give me the breed name. || select breed_name from breeds group by breed_name order by count ( * ) desc limit 1 || dog_kennels | breeds : breed_name, breed_code | dogs : breed_code || Exchange breed name with breed code and breeds table with dogs table in step 1.", "label": "dog_kennels | select breeds.breed_name from breeds join dogs on breeds.breed_code = dogs.breed_code group by breeds.breed_name order by count ( * ) desc limit 1" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG' intersect select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO'", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"APG\" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.SourceAirport = \"CVO\"", "question": "Which airlines have departing flights from both APG and CVO airports?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.Airline FROM airlines AS T1 WHERE T1.Country = \"APG\" INTERSECT SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = \"CVO\"", "predicted_parse_explanation": "[\"Step 1: find the Airline of airlines table for which airlines's Country equals APG\", 'Step 2: For each row in airlines table, find the corresponding rows in airports table', \"Step 3: find Airline of the results of step 2 whose airports's Country equals CVO\", 'Step 4: show the rows that are in both the results of step 1 and the results of step 3']", "feedback": "In step 1 replace airlines's country with flights's source airport , in step 3 airports's country with flights's source airport .", "context": "Which airlines have departing flights from both APG and CVO airports? || select airlines.airline from airlines where airlines.country = 'APG' intersect select airlines.airline from airlines join airports where airports.country = 'CVO' || flight_2 | airlines : airline, uid | flights : airline, sourceairport ( \"CVO\" ) || In step 1 replace airlines's country with flights's source airport, in step 3 airports's country with flights's source airport.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG' intersect select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO'" }, { "prediction": "flight_2 | select count ( * ) from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'", "gold_parse": "SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = \"Aberdeen\"", "question": "Return the number of flights departing from Aberdeen.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airports WHERE AirportName = \"Aberdeen\"", "predicted_parse_explanation": "['find the number of rows in airports table whose AirportName equals Aberdeen']", "feedback": "Find each value of source airport of flights table whose city equals Aberdeen .", "context": "Return the number of flights departing from Aberdeen. || select count ( * ) from airports where airportname = 'Aberdeen' || flight_2 | flights : sourceairport, airportname | airports : airportcode, city ( \"Aberdeen\" ) || Find each value of source airport of flights table whose city equals Aberdeen.", "label": "flight_2 | select count ( * ) from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'" }, { "prediction": "cre_Doc_Template_Mgt | select other_details from paragraphs where paragraph_text = 'Korea'", "gold_parse": "SELECT Other_Details FROM Paragraphs WHERE paragraph_text = 'Korea'", "question": "Show paragraph details for paragraph with text 'Korea'.", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T2.Other_Details FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.Document_ID = T2.Document_ID WHERE T1.Document_Name = \"Korea\"", "predicted_parse_explanation": "['Step 1: For each row in Documents table, find the corresponding rows in Paragraphs table', \"Step 2: find Paragraphs's Other_Details of the results of step 1 whose Document_Name equals Korea\"]", "feedback": "Find each value of paragraphs table whose paragraph text equals Korea .", "context": "Show paragraph details for paragraph with text 'Korea'. || select paragraphs.other_details from documents join paragraphs on documents.document_id = paragraphs.document_id where documents.document_name = 'Korea' || cre_Doc_Template_Mgt | paragraphs : other_details, paragraph_text ( \"Korea\" ) || Find each value of paragraphs table whose paragraph text equals Korea.", "label": "cre_Doc_Template_Mgt | select other_details from paragraphs where paragraph_text = 'Korea'" }, { "prediction": "world_1 | select country with surfacearea > ( select max ( surfacearea ) from country where continent = 'Europe' )", "gold_parse": "SELECT Name FROM country WHERE SurfaceArea > (SELECT min(SurfaceArea) FROM country WHERE Continent = \"Europe\")", "question": "What are the countries that have greater surface area than any country in Europe?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Continent FROM country WHERE SurfaceArea > ( SELECT Max ( SurfaceArea ) FROM country WHERE Region = \"Europe\" )", "predicted_parse_explanation": "['Step 1: find the maximum SurfaceArea in country table whose Region equals Europe', 'Step 2: find the Continent of country table whose SurfaceArea greater than the results of step 1']", "feedback": "use continent instead of region for step 1, and put name in place of continent for step 2.", "context": "What are the countries that have greater surface area than any country in Europe? || select continent from country where surfacearea > ( select max ( surfacearea ) from country where region = 'Europe' ) || world_1 | country : surfacearea, continent ( \"Europe\" ) || use continent instead of region for step 1, and put name in place of continent for step 2.", "label": "world_1 | select name from country where surfacearea > ( select min ( surfacearea ) from country where continent = 'Europe' )" }, { "prediction": "pets_1 | select count ( * ) from has_pet join student on has_pet.petid = student.stuid where student.age > 20", "gold_parse": "SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20", "question": "Find number of pets owned by students who are older than 20.", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Pets WHERE pet_age > 20", "predicted_parse_explanation": "['find the number of rows in Pets table whose pet_age greater than 20']", "feedback": "you need to replace pets table and pet age for pet table and age.", "context": "Find number of pets owned by students who are older than 20. || select count ( * ) from pets where pet_age > 20 || pets_1 | has_pet : petid, stuid | student : stuid, age ( 20 ) | pets : petid || you need to replace pets table and pet age for pet table and age.", "label": "pets_1 | select count ( * ) from student join has_pet on student.stuid = has_pet.stuid where student.age > 20" }, { "prediction": "student_transcripts_tracking | select students.first_name, students.mid_name, students.last_name from students join student_enrolment on students.student_id = student_enrolment.student_id where student_enrolment.degree_program_id = 'Bachelor'", "gold_parse": "SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'", "question": "What are the first, middle, and last names for everybody enrolled in a Bachelors program?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT first_name , middle_name , last_name FROM Students", "predicted_parse_explanation": "['find the first_name, middle_name, last_name of Students table']", "feedback": "Verify that student has enrolled in degree programs degree summary name equals Bachelor .", "context": "What are the first, middle, and last names for everybody enrolled in a Bachelors program? || select first_name, middle_name, last_name from students || student_transcripts_tracking | students : first_name, middle_name, last_name, student_id | student_enrolment : student_id, degree_program_id ( \"Bachelor\" ) || Verify that student has enrolled in degree programs degree summary name equals Bachelor.", "label": "student_transcripts_tracking | select distinct students.first_name, students.middle_name, students.last_name from students join student_enrolment on students.student_id = student_enrolment.student_id join degree_programs on student_enrolment.degree_program_id = degree_programs.degree_program_id where degree_programs.degree_summary_name = 'Bachelor'" }, { "prediction": "car_1 | select count ( * ), accelerate from cars_data where horsepower > ( select max ( horsepower ) from cars_data )", "gold_parse": "SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 )", "question": "What is the number of cars with a greater accelerate than the one with the most horsepower?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM cars_data WHERE Accelerate > 1", "predicted_parse_explanation": "['find the number of rows in cars_data table whose Accelerate greater than 1']", "feedback": "Find maximum value in horsepower along with that .", "context": "What is the number of cars with a greater accelerate than the one with the most horsepower? || select count ( * ) from cars_data where accelerate > 1 || car_1 | cars_data : accelerate, horsepower || Find maximum value in horsepower along with that.", "label": "car_1 | select count ( * ) from cars_data where accelerate > ( select accelerate from cars_data order by horsepower desc limit 1 )" }, { "prediction": "dog_kennels | select avg ( dogs.age ) from treatments join dogs on treatments.dog_id = dogs.dog_id", "gold_parse": "SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )", "question": "What is the average age of the dogs who have gone through any treatments?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT Avg ( age ) FROM Dogs WHERE gender = 1", "predicted_parse_explanation": "['find the average age in Dogs table whose gender equals 1']", "feedback": "There should be \"dog id should be located in treatments table\" instead of \"gender equals 1\".", "context": "What is the average age of the dogs who have gone through any treatments? || select avg ( age ) from dogs where gender = 1 || dog_kennels | dogs : age, dog_id | treatments : dog_id || There should be \"dog id should be located in treatments table\" instead of \"gender equals 1\".", "label": "dog_kennels | select avg ( age ) from dogs where dog_id in ( select dog_id from treatments )" }, { "prediction": "wta_1 | select winner_name from matches where winner_rank_points = ( select winner_rank_points from matches where tourney_name = 'Australian Open' ) order by winner_rank_points asc limit 1 )", "gold_parse": "SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1", "question": "What is the name of the winner with the most rank points who participated in the Australian Open tournament?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT winner_name FROM matches WHERE loser_ioc = \"Australian Open\" ORDER BY winner_rank Asc LIMIT 1", "predicted_parse_explanation": "['find the winner_name of matches table for which loser_ioc equals Australian Open with smallest value of winner_rank']", "feedback": "Change loser ioc with tourney name and \"smallest value of winner rank with \"largest value of winner rank points\".", "context": "What is the name of the winner with the most rank points who participated in the Australian Open tournament? || select winner_name from matches where loser_ioc = 'Australian Open' order by winner_rank asc limit 1 || wta_1 | matches : winner_name, winner_rank_points, tourney_name ( \"Australian Open\" ) || Change loser ioc with tourney name and \"smallest value of winner rank with \"largest value of winner rank points\".", "label": "wta_1 | select winner_name from matches where tourney_name = 'Australian Open' order by winner_rank_points desc limit 1" }, { "prediction": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) < 200", "gold_parse": "SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200", "question": "Which airlines have less than 200 flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Airline FROM airlines GROUP BY Airline HAVING Count ( * ) < 200", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of Airline in airlines table', 'Step 2: find Airline in airlines table whose corresponding value in step 1 is less than 200']", "feedback": "I want table of flights instead of table of airlines in step 1.", "context": "Which airlines have less than 200 flights? || select airline from airlines group by airline having count ( * ) < 200 || flight_2 | airlines : airline, uid | flights : airline || I want table of flights instead of table of airlines in step 1.", "label": "flight_2 | select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) < 200" }, { "prediction": "cre_Doc_Template_Mgt | select paragraphs.paragraph_id, paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Welcome to NY'", "gold_parse": "SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'", "question": "What are the ids and texts of paragraphs in the document titled 'Welcome to NY'?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT T2.Document_ID , T1.Date_Effective_To FROM Templates AS T1 JOIN Documents AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Document_Name = \"Welcome to NY\"", "predicted_parse_explanation": "['Step 1: For each row in Templates table, find the corresponding rows in Documents table', 'Step 2: find Document_ID, Date_Effective_To of the results of step 1 whose Document_Name equals Welcome to NY']", "feedback": "In step 1 use paragraphs table and switch document id, date effective to with paragraph id, paragraph text.", "context": "What are the ids and texts of paragraphs in the document titled 'Welcome to NY'? || select documents.document_id, templates.date_effective_to from templates join documents on templates.template_id = documents.template_id where documents.document_name = 'Welcome to NY' || cre_Doc_Template_Mgt | paragraphs : paragraph_id, paragraph_text, document_id | documents : document_id, document_name ( \"Welcome to NY\" ) || In step 1 use paragraphs table and switch document id, date effective to with paragraph id, paragraph text.", "label": "cre_Doc_Template_Mgt | select paragraphs.paragraph_id, paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Welcome to NY'" }, { "prediction": "orchestra | select conductor.name from orchestra join conductor on orchestra.conductor_id = conductor.conductor_id where orchestra.year_of_founded > 2003 order by orchestra.year_of_founded desc limit 2008", "gold_parse": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE Year_of_Founded > 2008", "question": "Please show the name of the conductor that has conducted orchestras founded after 2008.", "db_id": "orchestra", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "conductor", "orchestra", "performance", "show" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 ], "column_name": [ "*", "Conductor_ID", "Name", "Age", "Nationality", "Year_of_Work", "Orchestra_ID", "Orchestra", "Conductor_ID", "Record_Company", "Year_of_Founded", "Major_Record_Format", "Performance_ID", "Orchestra_ID", "Type", "Date", "Official_ratings_(millions)", "Weekly_rank", "Share", "Show_ID", "Performance_ID", "If_first_show", "Result", "Attendance" ] }, "db_foreign_keys": { "column_id": [ 8, 13, 20 ], "other_column_id": [ 1, 6, 12 ] }, "predicted_parse_with_values": "SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID WHERE T2.Year_of_Founded > 2003 ORDER BY T2.Year_of_Founded Desc LIMIT 2008", "predicted_parse_explanation": "['Step 1: For each row in conductor table, find the corresponding rows in orchestra table', 'Step 2: find the Name in the results of step 1 whose Year_of_Founded greater than 2003 ordered descending by Year_of_Founded', 'Step 3: only show the first 2008 rows of the results']", "feedback": "Remove \"ordered descending by year of founded and step 3 , Exchange 200 3 with 2008.", "context": "Please show the name of the conductor that has conducted orchestras founded after 2008. || select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id where orchestra.year_of_founded > 2003 order by orchestra.year_of_founded desc limit 2008 || orchestra | conductor : name, conductor_id | orchestra : conductor_id, year_of_founded ( 2008 ) || Remove \"ordered descending by year of founded and step 3, Exchange 200 3 with 2008.", "label": "orchestra | select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id where year_of_founded > 2008" }, { "prediction": "network_1 | select highschooler.name, count ( * ) from highschooler join friend on highschooler.id = friend.student_id group by highschooler.id", "gold_parse": "SELECT T2.name , count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id", "question": "Show the names of high school students and their corresponding number of friends.", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.name , T1.grade , Count ( * ) FROM Highschooler AS T1 JOIN Friend AS T2 ON T1.ID = T2.student_id GROUP BY T2.student_id", "predicted_parse_explanation": "['Step 1: For each row in Highschooler table, find the corresponding rows in Friend table', 'Step 2: for each value of student_id in the results of step 1, find the number of rows along with name and grade']", "feedback": "In step 2 ignore grade.", "context": "Show the names of high school students and their corresponding number of friends. || select highschooler.name, highschooler.grade, count ( * ) from highschooler join friend on highschooler.id = friend.student_id group by friend.student_id || network_1 | highschooler : name, id | friend : student_id || In step 2 ignore grade.", "label": "network_1 | select highschooler.name, count ( * ) from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id" }, { "prediction": "flight_2 | select airports.city from airports join flights on airports.airportname = flights.destination airport group by airports.city order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1", "question": "Which city has the most frequent destination airport?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT City FROM airports GROUP BY City ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: find the number of rows of each value of City in airports table', 'Step 2: find City of airports table with largest value in the results of step 1']", "feedback": "in step 1 use destination airport of city from flights table.", "context": "Which city has the most frequent destination airport? || select city from airports group by city order by count ( * ) desc limit 1 || flight_2 | airports : city, airportname | flights : destination airport of city || in step 1 use destination airport of city from flights table.", "label": "flight_2 | select airports.city from airports join flights on airports.airportcode = flights.destairport group by airports.city order by count ( * ) desc limit 1" }, { "prediction": "wta_1 | select first_name, country_code from players order by birth_date desc limit 1", "gold_parse": "SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1", "question": "What is the first name and country code of the oldest player?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT first_name , country_code FROM players ORDER BY birth_date Desc LIMIT 1", "predicted_parse_explanation": "['find the first_name, country_code of players table with largest value of birth_date']", "feedback": "\"largest value of birth date is Wrong . Need \"smallest value of birth date\".", "context": "What is the first name and country code of the oldest player? || select first_name, country_code from players order by birth_date desc limit 1 || wta_1 | players : first_name, country_code, birth_date || \"largest value of birth date is Wrong. Need \"smallest value of birth date\".", "label": "wta_1 | select first_name, country_code from players order by birth_date asc limit 1" }, { "prediction": "world_1 | select avg ( gnp ), sum ( population ) from country where governmentform = 'US Territory'", "gold_parse": "SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = \"US Territory\"", "question": "Give the mean GNP and total population of nations which are considered US territory.", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Sum ( GNP ) , Sum ( Population ) FROM country WHERE Continent = \"US Territory\"", "predicted_parse_explanation": "['find the summation of GNP and the summation of Population in country table whose Continent equals US Territory']", "feedback": "I want the average of GNP", "context": "Give the mean GNP and total population of nations which are considered US territory. || select sum ( gnp ), sum ( population ) from country where continent = 'US Territory' || world_1 | country : gnp, population, governmentform ( \"US Territory\" ) || I want the average of GNP", "label": "world_1 | select avg ( gnp ), sum ( population ) from country where governmentform = 'US Territory'" }, { "prediction": "wta_1 | select players.first_name, players.country_code, players.birth_date from players join matches on players.player_id = matches.player_id order by matches.winner_rank_points asc limit 1", "gold_parse": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1", "question": "What is the first name, country code, and birth date of the player with the most winner rank points across all matches?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T1.country_code , T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id ORDER BY T2.winner_rank Asc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in matches table', 'Step 2: find first_name, country_code, birth_date of the results of step 1 with smallest value of winner_rank']", "feedback": "Take \"largest value of winner rank points instead of \"smallest value of winner rank\".", "context": "What is the first name, country code, and birth date of the player with the most winner rank points across all matches? || select players.first_name, players.country_code, players.birth_date from players join matches on players.player_id = matches.loser_id order by matches.winner_rank asc limit 1 || wta_1 | players : first_name, country_code, birth_date, player_id | matches : player_id, winner_rank_points || Take \"largest value of winner rank points instead of \"smallest value of winner rank\".", "label": "wta_1 | select players.first_name, players.country_code, players.birth_date from players join matches on players.player_id = matches.winner_id order by matches.winner_rank_points desc limit 1" }, { "prediction": "dog_kennels | select owners.first_name, owners.last_name, dogs.size_code from owners join dogs on owners.owner_id = dogs.owner_id", "gold_parse": "SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id", "question": "What are each owner's first name, last name, and the size of their dog?", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT first_name , last_name , owner_id FROM Owners", "predicted_parse_explanation": "['find the first_name, last_name, owner_id of Owners table']", "feedback": "In the dog's table, you need to use the owner's Id in place of size code.", "context": "What are each owner's first name, last name, and the size of their dog? || select first_name, last_name, owner_id from owners || dog_kennels | owners : first_name, last_name, owner_id | dogs : size_code, owner_id || In the dog's table, you need to use the owner's Id in place of size code.", "label": "dog_kennels | select owners.first_name, owners.last_name, dogs.size_code from owners join dogs on owners.owner_id = dogs.owner_id" }, { "prediction": "wta_1 | select players.first_name, sum ( rankings.ranking_points ) from players join rankings on players.player_id = rankings.player_id", "gold_parse": "SELECT sum(ranking_points) , T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name", "question": "What are the first names of all players, and their total ranking points?", "db_id": "wta_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "players", "matches", "rankings" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "player_id", "first_name", "last_name", "hand", "birth_date", "country_code", "best_of", "draw_size", "loser_age", "loser_entry", "loser_hand", "loser_ht", "loser_id", "loser_ioc", "loser_name", "loser_rank", "loser_rank_points", "loser_seed", "match_num", "minutes", "round", "score", "surface", "tourney_date", "tourney_id", "tourney_level", "tourney_name", "winner_age", "winner_entry", "winner_hand", "winner_ht", "winner_id", "winner_ioc", "winner_name", "winner_rank", "winner_rank_points", "winner_seed", "year", "ranking_date", "ranking", "player_id", "ranking_points", "tours" ] }, "db_foreign_keys": { "column_id": [ 32, 13, 41 ], "other_column_id": [ 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT T1.first_name , T2.ranking FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id", "predicted_parse_explanation": "['Step 1: For each row in players table, find the corresponding rows in rankings table', 'Step 2: find first_name, ranking of the results of step 1']", "feedback": "Change ranking to total ranking points .", "context": "What are the first names of all players, and their total ranking points? || select players.first_name, rankings.ranking from players join rankings on players.player_id = rankings.player_id || wta_1 | players : first_name, player_id | rankings : ranking_points, player_id || Change ranking to total ranking points.", "label": "wta_1 | select sum ( ranking_points ), players.first_name from players join rankings on players.player_id = rankings.player_id group by players.first_name" }, { "prediction": "concert_singer | select stadium.name, stadium.capacity from stadium join concert on stadium.stadium_id = concert.stadium_id where concert.year > 2013 group by concert.stadium_id order by count ( * ) desc limit 1", "gold_parse": "SELECT T2.name , T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1", "question": "What is the name and capacity of the stadium with the most concerts after 2013?", "db_id": "concert_singer", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "stadium", "singer", "concert", "singer_in_concert" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3 ], "column_name": [ "*", "Stadium_ID", "Location", "Name", "Capacity", "Highest", "Lowest", "Average", "Singer_ID", "Name", "Country", "Song_Name", "Song_release_year", "Age", "Is_male", "concert_ID", "concert_Name", "Theme", "Stadium_ID", "Year", "concert_ID", "Singer_ID" ] }, "db_foreign_keys": { "column_id": [ 18, 21, 20 ], "other_column_id": [ 1, 8, 15 ] }, "predicted_parse_with_values": "SELECT T1.Name , T1.Capacity FROM stadium AS T1 JOIN concert AS T2 ON T1.Stadium_ID = T2.Stadium_ID WHERE T2.Year > 2014 GROUP BY T1.Stadium_ID ORDER BY Count ( * ) Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in stadium table, find the corresponding rows in concert table', 'Step 2: only keep the results of step 1 whose Year greater than 2014', \"Step 3: find the number of rows of each value of stadium's Stadium_ID in the results of step 2\", 'Step 4: find Name, Capacity of the results of step 2 with largest value in the results of step 3']", "feedback": "In step 2, you need to make sure year should be more than 2013.", "context": "What is the name and capacity of the stadium with the most concerts after 2013? || select stadium.name, stadium.capacity from stadium join concert on stadium.stadium_id = concert.stadium_id where concert.year > 2014 group by stadium.stadium_id order by count ( * ) desc limit 1 || concert_singer | stadium : name, capacity, stadium_id | concert : stadium_id, year ( 2013 ) || In step 2, you need to make sure year should be more than 2013.", "label": "concert_singer | select stadium.name, stadium.capacity from concert join stadium on concert.stadium_id = stadium.stadium_id where concert.year >= 2014 group by stadium.stadium_id order by count ( * ) desc limit 1" }, { "prediction": "world_1 | select count ( distinct countrylanguage.language ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Afghanistan'", "gold_parse": "SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = \"Afghanistan\" AND IsOfficial = \"T\"", "question": "How many official languages does Afghanistan have?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( DISTINCT Code2 ) FROM country", "predicted_parse_explanation": "['find the number of different Code2 in country table']", "feedback": "you have to provide total rows of countrylanguage table having country name afghanistan and t should be the is official.", "context": "How many official languages does Afghanistan have? || select count ( distinct code2 ) from country || world_1 | countrylanguage : language, countrycode | country : code, name ( \"Afghanistan\" ) || you have to provide total rows of countrylanguage table having country name afghanistan and t should be the is official.", "label": "world_1 | select count ( * ) from country join countrylanguage on country.code = countrylanguage.countrycode where country.name = 'Afghanistan' and isofficial = 'T'" }, { "prediction": "car_1 | select count ( * ) from countries", "gold_parse": "SELECT count(*) FROM COUNTRIES", "question": "How many countries are listed?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM continents", "predicted_parse_explanation": "['find the number of rows in continents table']", "feedback": "You need to supplant continents table with countries table.", "context": "How many countries are listed? || select count ( * ) from continents || car_1 | countries : || You need to supplant continents table with countries table.", "label": "car_1 | select count ( * ) from countries" }, { "prediction": "network_1 | select count ( distinct friend.friend_id ) from friend join highschooler on friend.student_id = highschooler.id where highschooler.name = 'Kyle'", "gold_parse": "SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = \"Kyle\"", "question": "How many friends does the high school student Kyle have?", "db_id": "network_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Highschooler", "Friend", "Likes" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 1, 1, 2, 2 ], "column_name": [ "*", "ID", "name", "grade", "student_id", "friend_id", "student_id", "liked_id" ] }, "db_foreign_keys": { "column_id": [ 5, 4, 6, 7 ], "other_column_id": [ 1, 1, 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Highschooler WHERE grade = \"Kyle\"", "predicted_parse_explanation": "['find the number of rows in Highschooler table whose grade equals Kyle']", "feedback": "Determine number of rows of friend table whose Highschooler's name equals Kyle .", "context": "How many friends does the high school student Kyle have? || select count ( * ) from highschooler where grade = 'Kyle' || network_1 | friend : friend_id, student_id | highschooler : id, name ( \"Kyle\" ) || Determine number of rows of friend table whose Highschooler's name equals Kyle.", "label": "network_1 | select count ( * ) from friend join highschooler on friend.student_id = highschooler.id where highschooler.name = 'Kyle'" }, { "prediction": "world_1 | select count ( * ) from country where continent = 'Asia'", "gold_parse": "SELECT count(*) FROM country WHERE continent = \"Asia\"", "question": "how many countries are in Asia?", "db_id": "world_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "city", "sqlite_sequence", "country", "countrylanguage" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "ID", "Name", "CountryCode", "District", "Population", "name", "seq", "Code", "Name", "Continent", "Region", "SurfaceArea", "IndepYear", "Population", "LifeExpectancy", "GNP", "GNPOld", "LocalName", "GovernmentForm", "HeadOfState", "Capital", "Code2", "CountryCode", "Language", "IsOfficial", "Percentage" ] }, "db_foreign_keys": { "column_id": [ 3, 23 ], "other_column_id": [ 8, 8 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM city", "predicted_parse_explanation": "['find the number of rows in city table']", "feedback": "Search number of rows of country table for which continent equals Asia .", "context": "how many countries are in Asia? || select count ( * ) from city || world_1 | country : continent ( \"Asia\" ) || Search number of rows of country table for which continent equals Asia.", "label": "world_1 | select count ( * ) from country where continent = 'Asia'" }, { "prediction": "dog_kennels | select professionals.first_name, professionals.last_name, professionals.cell_number from professionals join treatments on professionals.professional_id = treatments.professional_id where professionals.state = 'Indiana' group by professionals.professional_id having count ( * ) >= 2", "gold_parse": "SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2", "question": "Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone.", "db_id": "dog_kennels", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Breeds", "Charges", "Sizes", "Treatment_Types", "Owners", "Dogs", "Professionals", "Treatments" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 ], "column_name": [ "*", "breed_code", "breed_name", "charge_id", "charge_type", "charge_amount", "size_code", "size_description", "treatment_type_code", "treatment_type_description", "owner_id", "first_name", "last_name", "street", "city", "state", "zip_code", "email_address", "home_phone", "cell_number", "dog_id", "owner_id", "abandoned_yn", "breed_code", "size_code", "name", "age", "date_of_birth", "gender", "weight", "date_arrived", "date_adopted", "date_departed", "professional_id", "role_code", "first_name", "street", "city", "state", "zip_code", "last_name", "email_address", "home_phone", "cell_number", "treatment_id", "dog_id", "professional_id", "treatment_type_code", "date_of_treatment", "cost_of_treatment" ] }, "db_foreign_keys": { "column_id": [ 21, 21, 24, 23, 45, 46, 47 ], "other_column_id": [ 10, 10, 6, 1, 20, 33, 8 ] }, "predicted_parse_with_values": "SELECT professional_id , last_name , home_phone FROM Professionals WHERE state = \"Indiana\" UNION SELECT professional_id , last_name , home_phone FROM Professionals GROUP BY professional_id HAVING Count ( * ) > = 2", "predicted_parse_explanation": "['Step 1: find the professional_id, last_name, home_phone of Professionals table for which state equals Indiana', 'Step 2: find the number of rows of each value of professional_id in Professionals table', 'Step 3: find professional_id, last_name, home_phone in Professionals table whose corresponding value in step 2 is greater than or equals 2', 'Step 4: show the rows that are in any of the results of step 1 or the results of step 3']", "feedback": "In step 1 and 3 , You need to alter home phone with cell number and use treatments table in step 2.", "context": "Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone. || select professional_id, last_name, home_phone from professionals where state = 'Indiana' union select professional_id, last_name, home_phone from professionals group by professional_id having count ( * ) > = 2 || dog_kennels | professionals : first_name, last_name, cell_number, professional_id, state ( \"Indiana\" ) | treatments : professional_id || In step 1 and 3, You need to alter home phone with cell number and use treatments table in step 2.", "label": "dog_kennels | select professional_id, last_name, cell_number from professionals where state = 'Indiana' union select professionals.professional_id, professionals.last_name, professionals.cell_number from professionals join treatments on professionals.professional_id = treatments.professional_id group by professionals.professional_id having count ( * ) > 2" }, { "prediction": "flight_2 | select count ( * ) from flights where sourceairport = 'APG'", "gold_parse": "SELECT count(*) FROM FLIGHTS WHERE SourceAirport = \"APG\"", "question": "Count the number of flights departing from 'APG'.", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM airlines WHERE Airline = \"APG\"", "predicted_parse_explanation": "['find the number of rows in airlines table whose Airline equals APG']", "feedback": "i want source airport and flights in place of airline and airlines respectively.", "context": "Count the number of flights departing from 'APG'. || select count ( * ) from airlines where airline = 'APG' || flight_2 | flights : sourceairport ( \"APG\" ) || i want source airport and flights in place of airline and airlines respectively.", "label": "flight_2 | select count ( * ) from flights where sourceairport = 'APG'" }, { "prediction": "pets_1 | select count ( * ), stuid from student group by stuid", "gold_parse": "SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid", "question": "For students who have pets, how many pets does each student have?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT StuID , Count ( * ) FROM Student GROUP BY StuID", "predicted_parse_explanation": "['find each value of StuID in Student table along with the number of the corresponding rows to each value']", "feedback": "Replace student table with has pet table .", "context": "For students who have pets, how many pets does each student have? || select stuid, count ( * ) from student group by stuid || pets_1 | has_pet : stuid | student : stuid || Replace student table with has pet table.", "label": "pets_1 | select count ( * ), student.stuid from student join has_pet on student.stuid = has_pet.stuid group by student.stuid" }, { "prediction": "battle_death | select battle.name, battle.date from ship join battle on ship.lost_in_battle = battle.id where ship.name = 'Lettice' intersect select battle.name, battle.date from ship join battle on ship.lost_in_battle = battle.id where ship.name = 'HMS Atalanta'", "gold_parse": "SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta'", "question": "List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'", "db_id": "battle_death", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "battle", "ship", "death" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "name", "date", "bulgarian_commander", "latin_commander", "result", "lost_in_battle", "id", "name", "tonnage", "ship_type", "location", "disposition_of_ship", "caused_by_ship_id", "id", "note", "killed", "injured" ] }, "db_foreign_keys": { "column_id": [ 7, 14 ], "other_column_id": [ 1, 8 ] }, "predicted_parse_with_values": "SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = \"Lettice\" AND T2.name = \"HMS Atalanta\"", "predicted_parse_explanation": "['Step 1: For each row in battle table, find the corresponding rows in ship table', \"Step 2: find battle's name, date of the results of step 1 whose ship's name equals HMS Atalanta and ship's name equals Lettice\"]", "feedback": "name cannot be both HMS Atalanta and Lettice", "context": "List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta' || select battle.name, battle.date from battle join ship on battle.id = ship.lost_in_battle where ship.name = 'Lettice' and ship.name = 'HMS Atalanta' || battle_death | battle : name, date, id | ship : lost_in_battle, name ( \"HMS Atalanta\" ) || name cannot be both HMS Atalanta and Lettice", "label": "battle_death | select battle.name, battle.date from battle join ship on battle.id = ship.lost_in_battle where ship.name = 'Lettice' intersect select battle.name, battle.date from battle join ship on battle.id = ship.lost_in_battle where ship.name = 'HMS Atalanta'" }, { "prediction": "car_1 | select min ( weight ) from cars_data where cylinders = 8 and year = 1974", "gold_parse": "SELECT Weight FROM CARS_DATA WHERE Cylinders = 4 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1", "question": "What is the minimu weight of the car with 8 cylinders produced in 1974?", "db_id": "car_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "continents", "countries", "car_makers", "model_list", "car_names", "cars_data" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 ], "column_name": [ "*", "ContId", "Continent", "CountryId", "CountryName", "Continent", "Id", "Maker", "FullName", "Country", "ModelId", "Maker", "Model", "MakeId", "Model", "Make", "Id", "MPG", "Cylinders", "Edispl", "Horsepower", "Weight", "Accelerate", "Year" ] }, "db_foreign_keys": { "column_id": [ 5, 9, 11, 14, 16 ], "other_column_id": [ 1, 3, 6, 12, 13 ] }, "predicted_parse_with_values": "SELECT Min ( Weight ) FROM cars_data WHERE Year = 1", "predicted_parse_explanation": "['find the minimum Weight in cars_data table whose Year equals 1']", "feedback": "confirm that the year is 1974 and cylinders is 8.", "context": "What is the minimu weight of the car with 8 cylinders produced in 1974? || select min ( weight ) from cars_data where year = 1 || car_1 | cars_data : weight, cylinders ( 8 ), year ( 1974 ) || confirm that the year is 1974 and cylinders is 8.", "label": "car_1 | select weight from cars_data where cylinders = 4 and year = 1974 order by weight asc limit 1" }, { "prediction": "tvshow | select count ( * ) from cartoon where written_by = 'Joseph Kuhr'", "gold_parse": "SELECT count(*) FROM Cartoon WHERE Written_by = \"Joseph Kuhr\"", "question": "What is the number of cartoones written by Joseph Kuhr?", "db_id": "tvshow", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "TV_Channel", "TV_series", "Cartoon" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2 ], "column_name": [ "*", "id", "series_name", "Country", "Language", "Content", "Pixel_aspect_ratio_PAR", "Hight_definition_TV", "Pay_per_view_PPV", "Package_Option", "id", "Episode", "Air_Date", "Rating", "Share", "18_49_Rating_Share", "Viewers_m", "Weekly_Rank", "Channel", "id", "Title", "Directed_by", "Written_by", "Original_air_date", "Production_code", "Channel" ] }, "db_foreign_keys": { "column_id": [ 18, 25 ], "other_column_id": [ 1, 1 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Cartoon WHERE Written_by = \"Joseph Kuhr\" AND Directed_by = \"Ben Jones\"", "predicted_parse_explanation": "['find the number of rows in Cartoon table whose Written_by equals Joseph Kuhr and Directed_by equals Ben Jones']", "feedback": "Omit \"and directed by equals Ben Jones\" condition .", "context": "What is the number of cartoones written by Joseph Kuhr? || select count ( * ) from cartoon where written_by = 'Joseph Kuhr' and directed_by = 'Ben Jones' || tvshow | cartoon : written_by ( \"Joseph Kuhr\" ) || Omit \"and directed by equals Ben Jones\" condition.", "label": "tvshow | select count ( * ) from cartoon where written_by = 'Joseph Kuhr'" }, { "prediction": "student_transcripts_tracking | select count ( * ) from transcripts", "gold_parse": "SELECT count(*) FROM Transcripts", "question": "How many transcripts are listed?", "db_id": "student_transcripts_tracking", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Addresses", "Courses", "Departments", "Degree_Programs", "Sections", "Semesters", "Students", "Student_Enrolment", "Student_Enrolment_Courses", "Transcripts", "Transcript_Contents" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 ], "column_name": [ "*", "address_id", "line_1", "line_2", "line_3", "city", "zip_postcode", "state_province_county", "country", "other_address_details", "course_id", "course_name", "course_description", "other_details", "department_id", "department_name", "department_description", "other_details", "degree_program_id", "department_id", "degree_summary_name", "degree_summary_description", "other_details", "section_id", "course_id", "section_name", "section_description", "other_details", "semester_id", "semester_name", "semester_description", "other_details", "student_id", "current_address_id", "permanent_address_id", "first_name", "middle_name", "last_name", "cell_mobile_number", "email_address", "ssn", "date_first_registered", "date_left", "other_student_details", "student_enrolment_id", "degree_program_id", "semester_id", "student_id", "other_details", "student_course_id", "course_id", "student_enrolment_id", "transcript_id", "transcript_date", "other_details", "student_course_id", "transcript_id" ] }, "db_foreign_keys": { "column_id": [ 19, 24, 34, 33, 47, 46, 45, 51, 50, 56, 55 ], "other_column_id": [ 14, 10, 1, 1, 32, 28, 18, 44, 10, 52, 49 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Addresses", "predicted_parse_explanation": "['find the number of rows in Addresses table']", "feedback": "Substitute addresses with transcripts .", "context": "How many transcripts are listed? || select count ( * ) from addresses || student_transcripts_tracking | transcripts : || Substitute addresses with transcripts.", "label": "student_transcripts_tracking | select count ( * ) from transcripts" }, { "prediction": "pets_1 | select stuid from student except select stuid from has_pet join pets on has_pet.petid = pets.petid where pets.pettype = 'Cat'", "gold_parse": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'", "question": "What are the ids of the students who do not own cats as pets?", "db_id": "pets_1", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Student", "Has_Pet", "Pets" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "StuID", "LName", "Fname", "Age", "Sex", "Major", "Advisor", "city_code", "StuID", "PetID", "PetID", "PetType", "pet_age", "weight" ] }, "db_foreign_keys": { "column_id": [ 9, 10 ], "other_column_id": [ 1, 11 ] }, "predicted_parse_with_values": "SELECT T1.StuID FROM Student AS T1 EXCEPT SELECT T2.StuID FROM Has_Pet AS T2", "predicted_parse_explanation": "['Step 1: find the StuID of Student table', 'Step 2: find the StuID of Has_Pet table', 'Step 3: show the rows that are in the results of step 1 but not in the results of step 2']", "feedback": "Confirm to find pet type equals cat in step 2.", "context": "What are the ids of the students who do not own cats as pets? || select student.stuid from student except select has_pet.stuid from has_pet as has_pet || pets_1 | student : stuid | has_pet : stuid, petid | pets : petid, pettype ( \"Cat\" ) || Confirm to find pet type equals cat in step 2.", "label": "pets_1 | select stuid from student except select student.stuid from student join has_pet on student.stuid = has_pet.stuid join pets on pets.petid = has_pet.petid where pets.pettype = 'cat'" }, { "prediction": "cre_Doc_Template_Mgt | select count ( * ) from templates", "gold_parse": "SELECT count(*) FROM Templates", "question": "How many templates do we have?", "db_id": "cre_Doc_Template_Mgt", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "Ref_Template_Types", "Templates", "Documents", "Paragraphs" ], "db_column_names": { "table_id": [ -1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3 ], "column_name": [ "*", "Template_Type_Code", "Template_Type_Description", "Template_ID", "Version_Number", "Template_Type_Code", "Date_Effective_From", "Date_Effective_To", "Template_Details", "Document_ID", "Template_ID", "Document_Name", "Document_Description", "Other_Details", "Paragraph_ID", "Document_ID", "Paragraph_Text", "Other_Details" ] }, "db_foreign_keys": { "column_id": [ 5, 10, 15 ], "other_column_id": [ 1, 3, 9 ] }, "predicted_parse_with_values": "SELECT Count ( * ) FROM Ref_Template_Types", "predicted_parse_explanation": "['find the number of rows in Ref_Template_Types table']", "feedback": "Need to swap reference template types table with templates table .", "context": "How many templates do we have? || select count ( * ) from ref_template_types || cre_Doc_Template_Mgt | templates : || Need to swap reference template types table with templates table.", "label": "cre_Doc_Template_Mgt | select count ( * ) from templates" }, { "prediction": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) desc limit 1", "gold_parse": "SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.DestAirport OR T1.AirportCode = T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1", "question": "What is the code of airport that has the highest number of flights?", "db_id": "flight_2", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "airlines", "airports", "flights" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2 ], "column_name": [ "*", "uid", "Airline", "Abbreviation", "Country", "City", "AirportCode", "AirportName", "Country", "CountryAbbrev", "Airline", "FlightNo", "SourceAirport", "DestAirport" ] }, "db_foreign_keys": { "column_id": [ 13, 12 ], "other_column_id": [ 6, 6 ] }, "predicted_parse_with_values": "SELECT T1.AirportCode FROM airports AS T1 JOIN flights AS T2 ON T1.AirportCode = T2.SourceAirport ORDER BY T2.FlightNo Desc LIMIT 1", "predicted_parse_explanation": "['Step 1: For each row in airports table, find the corresponding rows in flights table', 'Step 2: find AirportCode of the results of step 1 with largest value of FlightNo']", "feedback": "you have to check flight in flights table which is most number of times part as source airport or destination airport. ", "context": "What is the code of airport that has the highest number of flights? || select airports.airportcode from airports join flights on airports.airportcode = flights.sourceairport order by flights.flightno desc limit 1 || flight_2 | airports : airportcode | flights : sourceairport || you have to check flight in flights table which is most number of times part as source airport or destination airport.", "label": "flight_2 | select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) desc limit 1" }, { "prediction": "poker_player | select final_table_made, best_finish from poker_player order by final_table_made asc limit 1", "gold_parse": "SELECT Final_Table_Made , Best_Finish FROM poker_player", "question": "List the final tables made and the best finishes of poker players.", "db_id": "poker_player", "db_path": "/home/jovyan/.cache/huggingface/datasets/downloads/extracted/b67b4703dfeeb8c199111263ff8a86ffe3a82d1a0bf03bb58a51a8d821fbe6f9/spider/database", "db_table_names": [ "poker_player", "people" ], "db_column_names": { "table_id": [ -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 ], "column_name": [ "*", "Poker_Player_ID", "People_ID", "Final_Table_Made", "Best_Finish", "Money_Rank", "Earnings", "People_ID", "Nationality", "Name", "Birth_Date", "Height" ] }, "db_foreign_keys": { "column_id": [ 2 ], "other_column_id": [ 7 ] }, "predicted_parse_with_values": "SELECT Final_Table_Made , Best_Finish FROM poker_player ORDER BY Best_Finish Asc LIMIT 1", "predicted_parse_explanation": "['find the Final_Table_Made, Best_Finish of poker_player table with smallest value of Best_Finish']", "feedback": "Skip \" with smallest value of Best Finish \".", "context": "List the final tables made and the best finishes of poker players. || select final_table_made, best_finish from poker_player order by best_finish asc limit 1 || poker_player | poker_player : final_table_made, best_finish || Skip \" with smallest value of Best Finish \".", "label": "poker_player | select final_table_made, best_finish from poker_player" } ]